Page 278 - Learn to Program - Basic-256
P. 278
Chapter 18: Files – Storing Information For Later. Page 262
15 print n + " " + line
16 end while
17 #
18 print "the file " + fn + " is " + size + " bytes
long."
19 close
Program 112: Read Lines From a File
file name> test.txt
1 These are the times that
2 try men's souls.
3 - Thomas Paine
the file test.txt is 57 bytes long.
Sample Output 112: Read Lines From a File
exist(expression)
Look on the computer for a file name specified by the string
expression. Drive and path may be specified as part of the file
name, but if they are omitted then the current working directory
will be the search location.
Returns true if the file exists; else returns false.
© 2019 James M. Reneau (CC BY-NC-SA 3.0 US)

