Navigation:  Language Reference > 10 - Expressions > Runtime Expression Evaluation >====== PUSHBIND (save runtime expression string name space) ====== Previous pageReturn to chapter overviewNext page

 

PUSHBIND( [ clearflag ] )

blk2blue.jpg

PUSHBIND Creates a new scope for subsequent BIND statements.
clearflag An integer constant or variable containing either zero (0) or one (1). When zero, the BIND statement's name space is cleared of all variables and procedures previously bound. When one, all variables and procedures previously bound are left in place. If omitted, the clearflag is zero.

The PUSHBIND statement creates a new scope for subsequent BIND statements. This scope terminates with the next POPBIND statement. This creates a new scope for subsequent BIND statements, allowing you to create new BIND names for variables with the same name without creating conflicts with the names from a previous scope.

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 <