Bind – AMT Datasouth PAL User Manual
Page 65

59
bind
bind
Description
Optimizes the specified procedure for faster execution.
Usage
AnyProc
bind
BoundProc
AnyProc
Procedure. The procedure to optimize.
BoundProc
Procedure. The same procedure after optimization.
Comments
When initially sent to a PAL printer by a programmer, a procedure contains executable name
objects which reference intrinsic operator objects in the dictionary stack. When the PAL interpreter
executes the procedure, it must locate each name within the dictionary stack when it encounters the
name in order to find the associated intrinsic operator object. The intrinsic operator object then
instructs the interpreter to perform the desired action.
This process permits the programmer to substitute alternate definitions for the standard PAL
interpreter operator names by associating alternate objects with each name on the dictionary stack.
However, in most cases, the programmer does not require this capability. As a result, replacing the
executable names within a procedure with the actual intrinsic operators associated with each name
can improve the execution speed of a procedure. The bind operator performs this substitution.
Once the bind operator has optimized a procedure, the interpreter directly encounters the intrinsic
operator objects when executing the procedure. The interpreter no longer needs to locate ex-
ecutable names within the dictionary stack every time it executes the procedure.
The bind operator also automatically optimizes any procedures defined within the specified pro-
cedure. The bind operator only substitutes executable name objects associated with intrinsic op-
erator objects. The operator does not substitute name objects associated with numeric, string, or
other object types.
Hints
Once the bind operator has replaced an executable name object with its associated intrinsic op-
erator object within a procedure, changes to the executable name within the dictionary stack no
longer affect the procedure. Therefore, the bind operator can protect a procedure from performing
undesired actions by preventing subsequent changes to operator names from affecting the
procedure.