The input statement <INPUT>


This operator is designed to input data from the keyboard when the program is running.

 

Format:

INPUT <numerical variable> | <string variable> | <literal string> 

   {, <numerical variable> | <string variable> | <literal string> {, :}}

 

Description:

The <INPUT> is the keyword for this statement. The list, which contains one or more math or string expressions, follows after the keyword. The number of expressions is not limited in this statement, if there are more than one expressions in the statement, the must be separated by commas.

The input window, which contains literal strings and input fields, will be constructed as a statement result. The checking of correspondence of inputted values to types of its variables is performed during the parameters input. Only numbers can be inputted in the numerical variable, any symbol can be inputted in the string variable. It is necessary to close the window after the input by pressing the <OK> button. After that the inputted values will be assigned to the corresponding variables.

This statement is analogue to the assignment, but the values of variables will be asked each running of program. This allows obtaining the new results of the same program by inputting various data.

 

Samples:

 

INPUT "sample data input: ", Zt

 

f_clip0480

 

MachineName$ = "Leader"

INPUT "Input the NC-machine name: ", MachineName$

 

f_clip0481

 

wx = 10; wy = 10; wz = 5

INPUT "Workpiece dimensions",

      "Along X axis", wx,

      "Along Y axis", wy,

      "Height by Z", wz

 

f_clip0482

 

Each edit field has two buttons to work with the Windows clipboard:

  • f_clip0483 – Copies the edit field text into clipboard (shortcut: [Ctrl+C]);
  • f_clip0484 – pastes the text from clipboard into the edit field (shortcut: [Ctrl+V]).

 

 

 

See also:

The output statement <PRINT>