animated GIF GDLA Logo
Welcome
Structure
Members
FoundersWhat is GDL?
Tools
News
GDL Rocks
Info
World

French

German

Japanese

Portuguese

Spanish

 to The GDL Alliance  >  Tools  >  GDL-Dreams  >  7-Text IO
GroupGDL TalkLearn GDL3NF
GDL DreamsGDL AdapterETShade
7-TextIO
   

TEXT and DATA I/O

These add-ons need to know how to behave in case of error. Let's say you are trying to open a file called FILE.TXT through the TEXT add-on. Couldn't the channel identifier retrieve the reading status, for example be set to -1 if the file is not found? Most of all, it would be needed that the rest of the GDL scripts be interpreted even if the add-on cannot find the file...

ch=OPEN("TEXT","FILE.TXT","MODE=R O")
IF ch=-1 THEN
PRINT "file not found, but scripts will be interpeted all the same"
ELSE
nr=INPUT(ch,1,1,val1,val2,val3)
ENDIF
CLOSE ch

Laurent Godel

GDLGuru

©2001 GDL Alliance / Last update Wednesday, September 5, 2001
[Welcome] [Structure] [Members] [Founders] [Tools] [News] [GDL Rocks] [Info] [World]