Assigning Values to Fields and Variables
Assignment is the process of placing values produced by expressions into fields or variables. You can assign values to fields or simple variables one at a time in direct assignments, or you can assign values to an entire form, table field, record, or array at once in query assignments. This is the basic syntax for assignment:
name := | = expression ;
• Name is the name of the simple field, table field, entire form, or global or local record type, array, or variable to which you are assigning values. Name cannot be the name of a derived field.
• ":=" or "=" are the two forms of the assignment operator. You can use either one. This operator assigns the value of the expression on the right of the statement to the object named on the left.
• A semicolon (;) statement separator is necessary to delimit a statement.
• Expression is the value the statement is assigning to name. This can be any legal 4GL expression of the same data type as that of name or of a compatible data type.
Last modified date: 08/28/2024