Input Commands

The following functions can be used to gather input data:

COMM

Retrieve the value or status of a communications parameter

COMM LINE

Receive a CR/LF terminated "line" of data from a serial port

COMM RECV

Receive binary data from a serial port

COMMAND$

Return the command-line used to start the program

ENVIRON

Modify the current program's environment table.

ENVIRON$

Retrieve strings from the operating system's environment table

EOF

Return end-of-file status of a file, serial or TCP/UDP transmission

FIELD

Bind a field string to a file buffer or dynamic string variable

FILESCAN

Rapidly scan a INPUT or BINARY file to obtain string size info

FREEFILE

Return the next available PowerBASIC file number

GET

Read a record from a random-access file

GET$            

Read a string from a file opened in binary mode

GETSTDIN  

Return the handle of the standard input device

GETSTDKBD       

Return the handle of the standard keyboard device

GRAPHIC INKEY$

Read a keyboard character if one is ready from the graphic window

GRAPHIC INPUT

Read data from the keyboard from within a graphic window

GRAPHIC INPUT FLUSH

Remove all buffered keyboard data.

GRAPHIC INSTAT

Determine whether a keyboard character is ready.

GRAPHIC LINE INPUT

Read an entire line from the keyboard from graphic window

GRAPHIC WAITKEY$

Read a keyboard character from the graphic window, waiting until one is ready.

GRAPHIC WINDOW CLICK

Check whether a graphic window has been clicked with the mouse

INKEY$

Read a keyboard or mouse event from the console input buffer

INPUT         

Read a line from the keyboard, assigning data to one or more variables

INPUT#

Load variables with data from a sequential file

INPUT FLUSH

Empty all pending keyboard and mouse events from the buffer

INSHIFT

Return the state of the keyboard Shift, Ctrl and/or Alt keys

INSTAT

Determine whether a keyboard or mouse event is available

KEY       

Assign a string expression to a function key (F1 to F12)

KEY$

Retrieve the string expression assigned to a function key with the KEY statement

LINE INPUT

Read an entire line from the keyboard into a string variable

LINE INPUT#

Read line(s) from a sequential file into a string variable or array

LOC

Determine the current seek position in an open disk file

LOF

Return the length of an open disk file

MOUSE

Turn on/off mouse event trapping and define required mouse events

MOUSEBUTTONS

Return the number of buttons on the system mouse

MOUSESTAT

Determine if a mouse event is waiting to be retrieved

MOUSEX

Return the current column (x coordinate) of the mouse cursor

MOUSEY

Return the current row (y coordinate) of the mouse cursor

PEEK

Return the byte at a specific memory location

PEEK$

Return a sequence of bytes starting at a specific memory location

STDEOF

Return TRUE if the end of standard input has been reached

STDIN LINE

Read one line of text from the standard input device

WAITKEY$         

Read a character or mouse event from the console input buffer

WAITSTAT        

Wait until a key is pressed or a mouse event occurs