## Console

iziBasic’s console, encapsulates 13 lines of text in which you can PRINT and INPUT some text or numbers. iziBasic will manage the vertical scrolling of these 13 lines.

CLS

Clears the console display screen

Notes:

- CLS does not clear the whole screen, it clears the 13 lines of text
- Would you wish to clear the full screen, you then need to use a BOXFILLED on the area, using the backcolor returned by the COLOR function

INPUT [c|t,] c|v

Notes:

- If the first c|t parameter is set (even to an empty string), the input is directly written on the current console text line as it is keyed in (with a possible correction, using the backspace character, being a pen move from middle right to middle left in Graffiti) and the input is memorized when the user keys in a line feed (or carriage return, being a pen move from top right to bottom left in Graffiti) character. This is the "standard" old fashion console way of doing an INPUT.
- If the first c|t parameter is omitted, displays a TEXTFIELD (for c) or NUMFIELD (for v) to read a text line or a number and a [Enter] button to validate the entry. Once [Enter] was pressed the input is assigned to c or v. The input field and the [Enter] button are then hidden.

PRINT

Outputs a line feed to the console screen

PRINT c|t[;]

Outputs c|t and a line feed to the console screen unless the optional [;] argument is set

PRINT v|n1 [USING v|n2][;]

Outputs v|n1 in the v|n2 format and a line feed to the console screen unless the optional [;] argument is set

Notes for USING v|n2:

- Gives the number of decimals to display
- If v|n<0 then display number in exponential notation
- If v|n=0 then display integer part of number
- If USING v|n is not set, then will display the number in exponential notation (equivalent to set it <0)

WAIT

Displays the [Enter] button and wait for this [Enter] button to be pressed

INKEY$

Reads the status of the keyboard (or a key keyed in in Graffiti) and returns a single keypress, if available

Notes:

- Returns an empty text string if no key was pressed. You will then track key pressed within a WHILE/WEND, a DO/LOOP or a REPEAT/UNTIL loop.

Example: REPEAT : K$=INKEY$ : UNTIL K$<>""