INPUT#
A statement which reads data in internal format from a file and puts them in the specified variables.
INPUT #E,A,B,C,D$,E$,F$
INPUT #3,aux$It is possible to read past the end-of-file without an error being reported. You should always include some form of check for the end of the file.
READ# can be used as an alternative to INPUT#.
Whilst BBC BASIC(Z80) stores numbers in internal format, text is stored in the usual way as a string of characters followed by a carriage-return. Consequently, you can use the INPUT# command to read text from, say, a PipeDream file.
See the ‘BBC BASIC(Z80) Files’ section for more details and numerous examples of the use of INPUT#.
Syntax
INPUT #<numeric>,<n-var>|<s-var>{,<n-var>|<s-var>}Associated Keywords
INPUT, OPENIN, OPENUP, OPENOUT, CLOSE#, PRINT#, BPUT#, BGET#, EXT#, PTR#, EOF#
Last updated on