TIED(retrieves a value associated with an ASTRING)

Top  Previous  Next

 

TIED(stringtoken, index)

TIED

Retrieves a string value that was previously associated to an ASTRING token.

stringtoken

A string constant or the label of a previously declared ASTRING token.

index

A numeric constant or variable defining the index value of an ASTRING. The index value may be any LONG value greater than zero.

The TIED statement retrieves the value that was previously associated to a particular ASTRING stringtoken and index. If a value is not TIED then 0 will be returned.

Return Data Type:     LONG

Example:

  PROGRAM

   MAP

   END

 

INCLUDE('EQUATES.CLW')

COLOR   EQUATE(1)

SIDES   EQUATE(2)

 

AS1     ASTRING

 

 CODE

 AS1 = 'SHAPE'

 TIE('SHAPE',COLOR,COLOR:RED)

 TIE(AS1,SIDES,3)

 IF TIED('SHAPE',SIDES) = 3

  AND TIED(AS1,COLOR) = COLOR:RED

  MESSAGE('Shape is a red triangle')

 END

See Also:

TIE

UNTIE