Sharp OZ-707 Operation Manual - Page 84
Open, Print
UPC - 074000012141
View all Sharp OZ-707 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 84 highlights
INPUT# p o FORMAT: INPUT# file number, variable, variable, ..., variable Abbreviation: 1.# See Also: OPEN, PRINT# PURPOSE: Reads items from sequential files on the RAM disk E. REMARKS: The file number is the number given to the file when opened for input with the OPEN statement. The file number must be a number specified in an OPEN statement. If the device name is specified as COM in the OPEN statement, it is not necessary to open for input with the OPEN statement. Specify variables as follows: • Fixed variables (A, X, etc.) • Simple variables (CD, EF$, A#, 8$, etc.) • Array elements (8(10), C$(5,5), etc.) An error occurs if the file contains less data than the number of specified variables. If the file contains more data, the rest of the data is ignored. The data and variables must be of the same type (e.g., numeric values must be assigned to numeric variables, single-precision values to single-precision variables, double-precision values to double-precision variables, etc.) Use a comma (,) , space (&H20), CR (&HOD), LF (&HOA), or CR + LF as a delimiter when data are read into numeric variables. Spaces preceding data are ignored. Use a comma (,), CR, LF, or CR + LF as a delimiter to read data into character variables. Spaces preceding data are ignored. If a double quotation mark appears at the beginning of data, data is read up to the next double quotation mark. A comma in a character string enclosed by double quotation marks is assumed not to be a delimiter. 156 EXAMPLE: 10: A$ = "AS" + CHR$ 34 + "CDEn + CHR$ 34 20: S$ = CHR$ 34 + "CD,EF" + CHR$ 34 30: PRINT A$ 40: PRINT B$ 50: OPEN nE:ABC.DAT" FOR OUTPUT AS #2 60: PRINT #2,A$;",";B$ 70: CLOSE 80: OPEN "E:ABC.DAT" FOR INPUT AS #2 90: INPUT #2, C$, D$ 100: PRINT C$ 110: PRINT D$ 120: CLOSE:END Execution RUN IEMlER I AS"CDE" "CD,EF" AB"CDE" CD ,EF 157