Amos Professional Manual  Contents  Index

Using the Keyboard


Keyboard inputs

WAIT KEY
instruction: wait for a key-press
Wait Key

This simple command waits for a single key-press before acting on the next instruction. For example:

E> Print "Please press a key" : Wait key : Print "Thank you!"

INPUT$
function: anticipate a number of characters to input into a string
v$=Input$(number)

This function loads a given number of characters into a string variable, waiting for the user to enter each character in turn. Although characters will not appear on the screen, similar to INKEY$, the two instructions are totally different. Here is an example:

E> Clear Key : Print "Please type in ten characters"
   V$=Input$(10) : Print "You typed: ";V$

There is another version of INPUT$ which operates with a number of characters from a disc. Please see Chapter 10.2 for details.

INPUT
instruction: load a value into a variable
Input variables;
Input "Prompt string";variables;

The INPUT command is used to enter information into one or more variables. Any variable may be used, as well as any set of variables, providing they are separated by commas. A question mark will automatically appear at the current cursor position as a prompt for your input.

If your own "Prompt string" is included, it will be printed out before your information is entered. Please note that a semi-colon must be used between your prompt text and the variable list, a comma is not allowed for this purpose.

You may also use an optional semi-colon at the end of your variable list, to specify that the text cursor is not to be affected by the INPUT command, and will retain its original position after your data has been entered.

When INPUT is executed, the program will wait for the required information to be entered via the keyboard, and each variable in the list must be matched by a single value entered by the user. These values must be of exactly the same type as the original variables, and should be separated by commas.

Back    Next
10.01.04