*
* Description :·%EoF() Example
*
* Syntex :
*
* %EoF(File Name)
*
* Output :·1 - when file pointer is reeached to end of file
* 0 - otherwise
*=====================================================
*
FFile1 IF E K Disk
D EoF S 1A
C
/Free
SetLL *LoVal File1 ;
Read File1 ;
DoW (%EoF(File1) = '0') ; // Or DoW Not(%EoF(File1))
// Or DoW Not(%EoF)
EoF = %EoF(File1) ;
Dsply Fld1 ; // R1FD1, R2FD1
Dsply EoF ; // 0
Read File1 ;
EndDo ;
EoF = %EoF(File1) ;
Dsply EoF ; // 1
/End-Free
C SetOn LR
No comments:
Post a Comment