INPUT

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
INPUT [prompt$;] var1 [,var2 [, var3 ...]]
INPUT #nbr, list of variables
INPUT$(nbr, [#]fnbr)

Description:

INPUT [prompt$;] var1 [,var2 [, var3 ...]]
Will take a list of values separated by commas (,) entered at the console and will assign them to a sequential list of variables. 
For example, if the command is: INPUT a, b, c And the following is typed on the keyboard: 23, 87, 66 Then a = 23 and b = 87 and c = 66 
The list of variables can be a mix of float, integer or string variables. The values entered at the console must correspond to the type of variable. 
If a single value is entered a comma is not required (however that value cannot contain a comma). 
‘prompt$’ is a string constant (not a variable or expression) and if specified it will be printed first. 
Normally the prompt is terminated with a semicolon (;) and in that case a question mark will be printed following the prompt. If the prompt is terminated with a comma (,) rather than the semicolon (;) the question mark will be suppressed.

INPUT #nbr, list of variables
Same as the normal INPUT command except that the input is read from a file previously opened for INPUT as ‘#fnbr’ or a serial port previously opened for INPUT as ‘nbr’. 
See the OPEN command. #0 can be used which refers to the console.

INPUT$(nbr, [#]fnbr)
Will return a string composed of ‘nbr’ characters read from a file on the SD card previously opened for INPUT with the file number ‘#fnbr’. 
This function will read all characters including carriage return and new line without translation. 
Will return a string composed of ‘nbr’ characters read from a serial communications port opened as 'fnbr'. 
This function will return as many characters as are waiting in the receive buffer up to ‘nbr’. 
If there are no characters waiting it will immediately return with an empty string. #0 can be used which refers to the console's input buffer. The # is optional. Also see the OPEN command.

 

Last edited: 29 September, 2020