| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== TIED(retrieves a value associated with an ASTRING) ====== | [[tie associate a string value to an astring .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[toansi.htm|{{btn_next_n.gif|Next page}}]] | | || **TIED(**//stringtoken//, //index//**)** {{blk2blue.jpg|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 associate a string value to an astring .htm|TIE]] [[untie disassociate a string value from an astring .htm|UNTIE]]