August 2010
Intermediate to advanced
288 pages
13h 21m
English
FileReader is a very simple program that displays the contents of a file on the NXT’s screen, one value at a time. This program uses two properties of the File Access block:
All values written to the file are text values. When you write a number, the File Access block converts it to a text value before writing it to the file. The block also converts a value from text to a number when reading the file, which means that you can read all the data from a file as text values, even if some or all of the data was originally numbers.
When reading from a file, the Error value will be true when all the data has been read. To read all the values in a file, you can read the values in a loop that continues until the Error value is true. ...