|
EOF
int
EOF (string
filename)
Return
Value
Returns TRUE if the end of file has been
reached. Otherwise, returns FALSE.
Parameters
filename
–the name of the
file to check.
Remarks
Checks if the
end of the file indicated by filename has been
reached.
Package
Plug in module:
nd_fileplg.npl
Example
The following
example demonstrates the use of EOF.
# Example for
EOF
WriteString("C:\txt.txt","string
1")
WriteString("C:\txt.txt","string
2")
WriteString("C:\txt.txt","string
3")
WriteString("C:\txt.txt","string
4")
WriteString("C:\txt.txt","string
5")
CloseFile("C:\txt.txt")
#read test
while
!EOF("C:\txt.txt")
Println("String
is:",
ReadString("C:\txt.txt"))
endwhile
CloseFile("C:\txt.txt")
#remove file
RemoveFile("C:\txt.txt")
Output of the example
script:
String
is: string 1
String
is: string 2
String
is: string 3
String
is: string 4
String
is: string 5
|