Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - ch_chr1( <nvalue> [, @<cmemvar> [, <nposition> ] ] ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CH_CHR1( <nValue> [, @<cMemvar> [, <nPosition> ] ] )


Parameters

<nValue>
Value (0-255) to poke.

<cMemvar>
Name of memory variable into which <nValue> should be poked.

<nPosition>
Byte position in the memory variable. The default is the first byte 
(1).


Returns

CH_CHR1(<nValue>) with no second parameter returns the character 
representation of the specified integer. (It returns the same value as 
the Clipper CHR() function.)


Description

The specified number is "poked" into the character variable at the 
specified byte position (default position = 1). The variable name must 
be prefixed with @ to be updated properly.


Examples

// Store CHR(27) into 8th byte of cString
CH_CHR1(27, @cString, 8)

// Same thing with SUBSTR
cString = SUBSTR(cString, 1, 7) + CHR(27) ;
          + SUBSTR(cString, 9)



See Also: CH_CHR2() CH_CHR4() CH_CHR8()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson