Top > Lycia reference > Querix 4GL > Statements > MESSAGE
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.
MESSAGE statement specifies a message that is displayed on the reserved message line.
Element |
Description |
Display Value |
The information which will be displayed by the MESSAGE statement |
ATTRIBUTE Clause |
Attributes that apply to the displayed information |
The display value can be:
A quoted character string which represents the text of the message.
A variable or variables of CHAR, VARCHAR or STRING data types that contain the message text. If you use several variables, their values will be concatenated into one character string.
A variable or variables of other data types (except BYTE data type).
The SPACE and CLIPPED operators can be used in the MESSAGE statement to organize the variables included into the display value.
DEFINE creat_date DATE,
file_name CHAR(30)
…
LET creat_date = 01/17/2010
LET file_name = "my_list.txt"
MESSAGE "The file ", file_name CLIPPED, 1 SPACE, "was created on ", creat_date
The above code will display the following message on the screen:
The file my_list.txt was created on 01/17/2010
The message remains on the screen until a menu is displayed, which uses the same line for being displayed, the erasing of the message can be avoided, if you specify another line as the message line. A message will be replaced by another message, if it is displayed.
If the message is longer than the message line, the message will be truncated from the right to fit the line.
A message is displayed on the message line. By default, the message line is the second line of the 4GL screen. If the menu is displayed it prevents the messages from being displayed as it uses the second line for displaying descriptions for the menu options. Even if there are no descriptions for the menu options, this line remains occupied by the MENU statement and MESSAGE text cannot be displayed if it uses the default message line.
Message text will also be invisible if the message line coincides with the form fields.
The default position of the message line can be changed by means of:
The MESSAGE LINE option in the closest OPTIONS statement
The MESSAGE LINE option in the ATTRIBUTE clause of the most recent OPEN WINDOW statement
To clear the message line you can display an empty character string:
MESSAGE " "
The general information about the ATTRIBUTE clause can be found in the ATTRIBUTE clause section of this reference. There are some specific issues that concern the usage of the ATTRIBUTE clause in the MESSAGE statement.
By default, the message text is displayed with the NORMAL attribute. To specify other attributes, use the ATTRIBUTE clause. The below example displays the MESSAGE text in green and with reversed video:
MESSAGE "This is a green reversed message" ATTRIBUTE (GREEN, REVERSE)
The INVISIBLE attribute is ignored in the MESSAGE ATTRIBUTE clause.
It is possible to use substrings of CHAR, VARCHAR, STRING or TEXT data types in the MESSAGE statement by specifying the starting and ending points of the substring in the square brackets:
MESSAGE "The goods descriptions were added to the table: ", descr [165, 170] CLIPPED, 1 SPACE, descr [405, 420]