Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileINPUT ["text",] x [,y,...] INPUT ["text";] x [,y,...] x, y: avar or svar The command INPUT can be used in several ways. It accepts the input of variables or variable lists with or without a text message being displayed on the screen. For INPUT, the cursor will normally retain its last screen position; however, by means of PRINT AT() followed by a semicolon, or by using LOCATE, VTAB, or HTAB, the cursor can be put at a desired screen position. A text string may follow the INPUT command, separated from the following variables by a comma or a semicolon. If a semicolon is used, then a question mark and a space are printed on the screen and the cursor placed at the succeeding character position. When a comma is used, the question mark and space are omitted, and the cursor is placed directly after the last character of the text string. If no text is to be displayed, then the question mark and space are printed, and the cursor is put directly after the space (as if a null string ("") had been used as text, followed by a semicolon). When only one variable is to be input, the user types in a number or a character string and terminates it by pressing either the Return or the Enter key. When several values are to be entered (if there was a list of variables after the INPUT statement in the program line), each individual variable can be terminated by pressing Return or Enter, or they may be typed in separated by commas and all confirmed together with a single press of the Return or Enter key. If a string is to be entered which may contain commas, the instruction LINE INPUT must be used. If a numeric variable was expected by the INPUT statement, and a non-numeric string typed in instead, a bell signal sounds, and the input must be repeated. Prior to the Return or Enter key being pressed the input can be edited by means of the Backspace, Delete, and Left and Right arrow keys. Pressing the INSERT key switches between, insert and overwrite modes during editing. The maximum length of the input is 255 characters. Special symbols can be entered in three different ways: - By holding down the Alternate key and typing in the ASCII code of the desired character using the numeric pad. When the Alternate key is released, the appropriate character is displayed. For instance, with 64 as the ASCII code, the character '@' appears. This also works with INKEY$, INP(2), GEM Dialog Boxes etc., if it is not switched off by the command KEYPAD. - By typing Control-S followed by another character, for example Control-S C for the Pi character. (Press the Control and S key at the same time, then press C.) This feature only works with the INPUT statement or in Edit mode, when a program is actually being typed in. - By typing Control-A followed by the ASCII code of the desired character, e.g.: Control-A 64 for the '@' character. Example: INPUT a$ INPUT "",b$ INPUT "Enter two numbers :";x,y PRINT a$,b$,x,y --> Reads in two strings and two numeric variables. The first input command generates a ?, the second appears with no text and the third issues the message 'Enter two numbers: ?'.