The Meta Instruction Set - Generated assignments.

Basic.

The following table describes the basic assignments available in meta code. Some of them set fields to values and others change their panel attributes.

++Set Empty Sets the current field to its empty value.
++Set Focus Set the focus to the current field if it is in a panel variable.
++Set State <state> Sets the control state of the current field if it is in a panel variable.
++Set Value <value> Sets the field to one of the special states: NULL, Empty, High,Low

The value parameter for the++Set Value instruction is in the form of a verb, FLD Null VAL for example.

Each of these instructions require the current meta source object to be a field in a variable.

Field to Field.

When the current meta source object is a field in a variable, it is possible to generate assignments from and to the same field in another variable. There are a pair of meta instructions to allow you to do this: ++Cast to and ++Cast from. When used in this way they take a variable name as their parameter. This actually generates a sequence of Set action diagram statements, one for each field in the meta loop. If the field does not exist in the parameter variable no code is generated.

An alternative form of these instructions allows you to move the field's value to a different field and vice versa. In this case, the parameter is a field qualified by its variable. A Cast statement is generated for each field in the meta loop. An example of this use is in the Process user filter part of the Entity with user filter.Filter view.Get sequential function:

Variable index.

When a variable has the VAR occurs NBR triple, it is a multiple occurrence variable (MOV). As such, you choose which occurrence of the variable you want to operate on by means on the Use action diagram instruction. The equivalent meta instruction is ++Use. This takes a numeric field in a variable as its parameter and, if the current meta source object is a variable, generates the Use instruction for the variable.

Object name.

It is possible to set a character type field to the name of almost any model object using the ++Name meta variable, target field meta instruction. You need to know about meta variables to use this instruction and these will be explained in a later part. For the moment, all you need to know is that a meta variable can store a reference to a model object. It is the name of this object that is used to set the value of the target field. This is all resolved at generation time and so, in the generated code, you see the target field being set to a text string.

The default generated text string is the short form of the object name without any scoping. You can add a parameter to the instruction to modify the name to be generated. This parameter can have the following special values:

.Unscoped This is the same as the default and returns the short unscoped name of the object.
.Scoped This value returns the fully scoped name of the object.
.Language This gets the name of the object in the current national language configuration. See the Name NME verb.
.Surrogate This returns a unique text string for the object, derived by its internal object identifier.
.Library This sets the target field to the name of the library in which the object is defined, if any. It is the name you see in the object browser that prefixes the object.

With all of these parameter the leading dot (.) is important.

Go to: Top : Next page