Home Page


BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
Sprite
ASCII and CHR$ Codes

eMail
email5-commodorecheetah.co.uk

Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

INPUT#
Abbreviation: I <SHIFT+N>

TYPE: I/O Statement
FORMAT: INPUT# <file number> , <variable list>

Action: This is usually the fastest and easiest way to retrieve data stored in a file on disk or tape. The data is in the form of whole variables of up to 80 characters in length, as opposed to the one-at-a-time method of GET#. First, the file must have been OPENed, then INPUT# can fill the variables.

The INPUT# command assumes a variable is finished when it reads a RETURN code (CHR$ (13)), a
comma (,), semicolon (;), or colon (:). Quote marks can be used to enclose these characters when writing if
they are needed (see PRINT# statement).

If the variable type used is numeric, and non-numeric characters are received, a BAD DATA error results. INPUT# can read strings up to 80 characters long, beyond which a STRING TOO LONG error results.

When used with device #3 (the screen), this statement will read an entire logical line and move the cursor down to the next line.

EXAMPLES of INPUT# Statement:

10 INPUT#1,A
20 INPUT#2,A$,B$


Commodore Cheetah made by Allen Monks, started in the year 2000.