To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
PROMPT statement assigns values supplied by the users to the program variables.
Element |
Description |
Expression List |
Expression List which returns the message displayed by the prompt statement |
ATTRIBUTE Clause |
Display attributes applied to the displayed message and to the entered value |
Variable |
The variable to which the entered value is assigned |
HELP Clause |
The clause that specifies the number of the help message |
INPUT Control block |
The clause that controls the input of the prompted value |
The PROMPT statement must be followed by the message that is displayed on the PROMPT line and that informs the user what kind of data are expected. The message may be represented by a quoted character string, or by a variable of character data type. When the PROMPT statement is executed, 4GL waits for the user input. After the value is entered, it is assigned to the variable specified in the FOR clause, unless the typed value coincides with the key-name specified in the ON KEY clause.
The following actions are performed when 4GL encounters a PROMPT statement:
If any variables are present in the prompt text, they are replaced with their current values.
The values, and quoted character strings are concatenated into a single prompt message (the total length of such message must not exceed 80 bytes)
The prompt message is displayed on the PROMPT LINE (which is the first line of a 4GL window or 4GL screen by default)
4GL waits for the user input
The entered value is assigned to the variable specified in the FOR clause.
The prompt field remains active and the prompt message remains visible until the input is performed.
The PROMPT statement must include such components:
PROMPT string
FOR clause
There are also optional components that may follow the required components:
ATTRIBUTE clause
HELP clause
PROMPT input control clause
BEFORE PROMPT clause
ON KEY and ON ACTION clauses
AFTER PROMPT clause
If at least one PROMPT input control clause is present within the PROMPT statement, the END PROMPT statement is required to mark the end of the PROMPT statement.
The PROMPT input control clauses can be listed in any order within the PROMPT statement, but they will be executed in the order in which they are listed above. However, all the other optional clauses must be placed in the order specified by the diagram, otherwise a compile-time error may occur.