Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7 109
Chapter 2 Program Instructions
GETASSOC$
Field of Application
Function for getting a value from a string association.
Syntax GETASSOC$ (<sexp
1
>, <sexp
2
>)
<sexp
1
> is the name of the association (case-sensitive).
<sexp
2
> is the name of a tuple in the association.
Remarks
An association is an array of tuples, where each tuple consists of a
name and a value.
Example
This example shows how a string, including three stringnames associated
with three start values, will be defi ned and one of them (time) will
be changed:
10 QUERYSTRING$=
"time=UNKNOWN&label=321&desc=DEF"
20 MAKEASSOC"QARRAY",QUERYSTRING$,"HTTP"
30 QTIME$=GETASSOC$("QARRAY","time")
40 QLABELS%=VAL(GETASSOC$("QARRAY","label"))
50 QDESC$=GETASSOC$("QARRAY","desc")
60 PRINT"time=";QTIME$,"LABEL=";QLABELS%,
"DESCRIPTION=";QDESC$
70 SETASSOC"QARRAY","time",time$
80 PRINT"time=";GETASSOC$("QARRAY","time")
RUN
yields:
time=UNKNOWN LABEL=321 DESCRIP TION=DEF
time=153355