User Tools

Site Tools


tied_retrieves_a_value_associated_with_an_astring.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== TIED(retrieves a value associated with an ASTRING) ====== Previous pageReturn to chapter overviewNext page

TIED(stringtoken, index)

blk2blue.jpg

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

tied_retrieves_a_value_associated_with_an_astring.htm.txt · Last modified: 2021/04/15 15:57 (external edit)