read

read() is an overloaded routine.

This version parses a value from a string.

read(inStr,        // String to parse
     result)       // variable to receive newly parsed value

This version also parses a value from a string, but returns a status.

read(inStr,        // String to parse
     result,       // variable to receive newly parsed value
     status)       // boolean, true if parse was successful

This version reads a word value from a text file.

read(fileVar,      // file variable of file to be read
     location)     // sfr or shared location to receive value

inStr A string variable to be parsed. Typically the string was read from an input file. Parsing occurs from left to right in the string. Note that after the call to read(), the parsed value will be removed from the string.

result is a variable that receives the parsed value. The variable can be of type integer, string, or time. The format of the string token varies based on type.

"FF 03E 25"                 // typical integer tokens
"typical string tokens"     // typcial string tokens
"10 ms 20 us"               // typcial time tokens

location is an SFR or shared location to receive the newly read value.

status is a boolean variable containing read operation status. If true, the read operation succeeded.