Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '' Write out text file:
- open "test.txt" for output as #1
- print #1, "Hello,"
- print #1, ""
- print #1, "this is an example text file,"
- print #1, "generated with the help of FreeBASIC."
- close #1
- print "done that"
- ScreenRes 320, 240, 8
- ' Plot a pixel at the coordinates 100, 100, Color 15. (white)
- PSet (100, 100), 15
- ' Confirm the operation.
- Locate 1: Print "Pixel plotted at 100, 100"
- ' Wait for a keypress.
- Sleep
- '' ---
- '' Display text file line by line:
- open "list.text" for input as #1
- dim as string ln
- do until( eof(1) )
- line input #1, ln
- print ln,right(ln,1),lobyte(valUInt(ln)) 'lowByte(ln)
- loop
- close #1
- sleep
Advertisement
Add Comment
Please, Sign In to add comment