====== GET# ====== [vic20] [c16] [cplus4] [c64] [c128] [m65] The ''GET#'' statement is used to read a single character from a file. The file must be opened beforehand with the same logical file number, using the ''[[OPEN|OPEN]]'' statement. ===== Syntax ===== GET #, The character that is read from the file is assigned to the specified variable as per the following rules: * If the variable is of a numeric type, it will be assigned the numeric PETSCII code of the character, * If the variable is a ''STRING'', it will assigned the character itself, as string. The variable must be predefined. File I/O commands are not implemented for the Commodore PET. ===== Examples ===== REM -- dump raw contents of a file DIM char$ AS STRING * 1 CONST EOF = 64 OPEN 2, 8, 2, "filename" DO WHILE ST() <> EOF GET #2, char$ PRINT char$; LOOP CLOSE 2