User Tools

Site Tools


bindable_set_runtime_expression_string_variables_.htm
Navigation:  Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== BINDABLE (set runtime expression string variables) ====== Previous pageReturn to chapter overviewNext page

BINDABLE

The BINDABLE attribute declares a GROUP, QUEUE, FILE, or VIEW whose constituent variables are all available for use in a runtime expression string. The contents of each variable's NAME attribute is the logical name used in the dynamic expression. If no NAME attribute is present, the label of the variable (including prefix) is used. Space is allocated in the .EXE for the names of all of the variables in the structure. This creates a larger program that uses more memory than it normally would. Therefore, the BINDABLE attribute should only be used when a large proportion of the constituent fields are going to be used.

The BIND(group) form of the BIND statement must still be used in the executable code before the individual fields in the QUEUE structure may be used.

Example:

Names   QUEUE,BINDABLE                    !Bindable Record structure

Name      STRING(20)

FileName  STRING(8),NAME('FName')         !Dynamic name: FName

Dot       STRING(1)                       !Dynamic name: Dot

Extension STRING(3),NAME('EXT')           !Dynamic name: EXT

       END

CODE

BIND(Names)

Names   FILE,DRIVER('Clarion'),BINDABLE   !Bindable Record structure

Record   RECORD

Name      STRING(20)

FileName  STRING(8),NAME('FName')         !Dynamic name: FName

Dot       STRING(1)                       !Dynamic name: Dot

Extension STRING(3),NAME('EXT')           !Dynamic name: EXT

        END

       END

CODE

OPEN(Names)

BIND(Names)

FileNames GROUP,BINDABLE                  !Bindable group

FileName   STRING(8),NAME('FILE')         !Dynamic name: FILE

Dot        STRING('.')                    !Dynamic name: Dot

Extension  STRING(3),NAME('EXT')          !Dynamic name: EXT

         END

See Also:

BIND

UNBIND

EVALUATE

bindable_set_runtime_expression_string_variables_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1