Input (channel, value)
Data read with Input # is usually written to a file with Write #. Use this function only with files opened in Input or Binary mode.
When read, standard string or numeric data is assigned to variables without modification. The following table illustrates how other input data is treated:
Data | Value assigned to variable |
---|---|
Delimiting comma or blank line | Empty |
#NULL# | Null |
#TRUE# or #FALSE# | True or False |
#yyyy-mm-dd hh:mm:ss# | The date and/or time represented by the expression |
#ERROR errornumber# | errornumber (variable is an Objecttagged as an error) |
If you reach the end of the file while you are inputting a data item, the input is terminated and an error occurs.
Input Function | Open Statement | Print # Statement | Write # Statement | Writing Data to Files