Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#399 AREXX Open() Filehandle reusing

open
Mark Hessling
5
2012-12-09
2012-12-09
Matthias Rustler
No

When I run the following example with Regina 3.3 on my Ubuntu-Linux system:

OPTIONS AREXX_SEMANTICS
OPTIONS AREXX_BIFS

Say '#1'
IF ~Open(.File, 'tstfile', 'READ') THEN EXIT
i = 0
DO WHILE ~EOF(.File)
File.i = ReadLn(.File)
i = i + 1
END
CALL Close .File

Say '#2'
IF ~Open(.File, 'tstfile', 'WRITE') THEN EXIT
Say '#3'

it prints only
#1
#2

Only when I change the filehandle of the 2nd Open() I get the expected
#1
#2
#3

Discussion