Error in example of CharIn() return
Brought to you by:
rexx
On p. 153:
Suppose a text file contains the following three lines (ASCII character set is assumed):
first second third
and you first read it line-wise and then character-wise. Assume the following program:
file = 'DATAFILE' foo = '' do i=1 while chars(file)>0 foo = foo || c2x(charin(file))' ' end say foo
When the file is read line-wise, the output is identical on all machines, i.e. the three lines shown above. However, the character-wise reading will be dependent on your operating system and its file system, thus, the output might e.g. be any of:
66 69 72 73 74 73 65 6F 63 6E 64 74 68 69 72 64 66 69 72 73 74 0A ^^^^^^^^^^^^^^ not returned