21. 4GL Statement Glossary : Assignment : Direct Assignments
 
Share this page                  
Direct Assignments
A direct assignment statement assigns a value into a simple field in a form, a simple local variable, a column in a table field, or the attribute of a record or an array record attribute. The value and the object must have Ingres data types that are compatible.
During character field assignment, 4GL truncates values that are longer than the field itself. Other data types must fall within their appropriate numeric range.
4GL does not automatically perform a validation check when an expression is assigned to a field. To check that the value conforms to the current VIFRED specification for the form, you can either:
Issue a validate field statement
Access the field and check for an error using inquire_forms frs
In the event of a validation check failure, return control to the user to correct the field input.