Section 14.1: Fake Comments {! ... !} Up Chapter 14: Extensions Section 14.3: Paused Screen Handling  

14.2 Associative Arrays

To define an associate array:
DEFINE name ASSOCIATE [CHAR] (nc) WITH ARRAY [nx] OF datatype
Where nc is the number of characters to use for the index, and nx is the total number of elements that may be stored.
Example:
DEFINE lv_desc  ASSOCIATE [CHAR](1) WITH ARRAY[40] of CHAR(40)


LET lv_desc<<"A">>="Active"
LET lv_desc<<"I">>="Inactive"
LET lv_desc<<"R">>="Running"
LET lv_desc<<"D">>="Deleted"
LET lv_state="A"
.
.
DISPLAY lv_desc<<lv_state>>
(This is for illustration, the data would normally be read from a database!)
 Section 14.1: Fake Comments {! ... !} Up Chapter 14: Extensions Section 14.3: Paused Screen Handling