Navigation: Language Reference > 10 - Expressions > Runtime Expression Evaluation >====== POPBIND (restore runtime expression string name space) ====== | |
POPBIND
The POPBIND statement restores the previous BIND statement's name space for variables and procedures previously bound. This restores the previous scope used by previous BIND statements.
Example:
SomeProc PROCEDURE
OrderNumber LONG
Item LONG
Quantity SHORT
CODE
BIND('OrderNumber',OrderNumber)
BIND('Item',Item)
BIND('Quantity',Quantity)
AnotherProc !Call another procedure
UNBIND('OrderNumber',OrderNumber)
UNBIND('Item',Item)
UNBIND('Quantity',Quantity)
AnotherProc PROCEDURE
OrderNumber LONG
Item LONG
Quantity SHORT
CODE
PUSHBIND !Create new scope for BIND
BIND('OrderNumber',OrderNumber) !Bind variables with same names in new scope
BIND('Item',Item)
BIND('Quantity',Quantity)
!Do some Processing
UNBIND('OrderNumber')
UNBIND('Item')
UNBIND('Quantity')
POPBIND !Restore previous scope for BIND
See Also: