All field operators must be immediately followed by the name of the field to which they are referring (always in upper case).
The %
operator pushes the contents of the designated field name from the
current record onto the stack.
The %%
operator pushes the name of the given field on the stack. This is
similar to but not identical to quoting the field name.
The %#
operator pushes the length of the given field name on the
stack. This is the defined maximum length in characters of the given field.
The %$
operator pushes the type of the given field name on the stack.
This is a one character string which is the type of the given field, this
will be C
(character/string), N
(numeric), D
(date),
L
(logical), or M
(memo) although this last type is not supported.
The given field name can be more complex than a simple name to support
referencing more that one database file and direct record indexing within that
database file. The syntax of this is given below using the get field operator
%
as an example although any of the field operators above accept the
same syntax variants.
The %field
syntax just gets the value of the field
from the
current record and is the default syntax given above.
The %field[index]
syntax gets the value of the field
from
the record with the given index
(record indecies go from one to the number of
records in the database).
The %database->field
syntax gets the value of the field
from the
current record of the given database
(name should match that given when the
database file was declared using the DATABASE predefined macro
without the pathname or extension).
The %database->field[index]
syntax gets the value of the
field
from the record with the given index
of the given
database
.
The index
can be a simple numeric literal or any normal equate processing that
returns a numeric value. There should be no whitespace in the above syntax forms
except where the index
value is a more complex equate which can include
whitespace if neccessary.
The above syntax forms all bypass any active filters. The current record variants, when referring to a database other than the master database, will always refer to the first record of that database.
Go to the first, previous, next, last section, table of contents.