A <file-reference> can be either a valid file pathname - absolute
or relative -
or a <variable> containing a string corresponding to a valid
pathname.
Relative file pathnames of functions or subroutines are first
sought for with respect to the working directory of Tefigel, then
using the current <library-path-specifier>, described later in the
guide. Tefigel will first attempt to access the file with the given name;
in case of failure it will try to access the file adding the extension ".tfg".
In other words, extension ".tfg" is optional and may be omitted in
<file-reference>'s.
A <subprogram-reference> can be either a <file-reference>
or a <built-in-function>. The call instruction may be omitted.
A <parameter-list> is a sequence of strings or <variable>'s,
separated by the character currently associated with <special-function>
argdelim.
The <call-key> is the character currently associated with
<special-function> callkey.
A <new-variable-list> is a sequence of <variable>'s,
separated by the character currently associated with <special-function>
argdelim.
The <parameter-list> may be omitted, in which case it is also
possible to omit the left and right parentheses.
Arguments supplied as parameters
to a function or subroutine are made available in the new name space
of the called function or subroutine as "register" variables identified
as
REG_0,
REG_1,
REG_2,
etc., according
to their sequential position in the <parameter-list>. Unspecified
registers are guaranteed to be initialized to the empty string.
The number of arguments is available in variable
REG_COUNT.
The complete list of arguments is also available in variable
REG_ALL.
Instruction shift transfers the contents of each
REG_n into
REG_n - 1, decrements REG_COUNT,
and updates REG_ALL accordingly.
Instruction interface automatically initializes each
variable in the <new-variable-list> to the value of the
register in the corresponding order position.
A <new-variable-list> in the form "..." specifies that
the function or subroutine has a variable number of parameters, hence
no automatic initialization is performed.
Beyond positional association, no restriction is imposed, and no check is
performed, by Tefigel on the function or subroutine signature,
so that it is possible to supply a variable number of arguments
to functions and subroutines.
Currently, Tefigel supports up to 32 parameters.
Functions may set their return value by means of instruction
retvalue.
Returning from a function or subroutine is automatically
performed when the end of the file containing the function or
subroutine is reached. Alternatively, instruction quit
can be used to explicitly return from the function or subroutine.
A <code-file> is a file where each line is interpreted as
a <command>.