The « Virtual key » of a keyed data queue is composed as follow:
• TIMEOUT field: Number of seconds to wait before returning with HOut = True
• FILER : must be blank.
• ORDER: a 2-character field containing the comparison operator (EQ, NE, GT, GE, LT, LE).
• Key value to search for.
ORDER field has the folowing meaning :
EQ |
= |
Equal to |
NE |
<> |
Non equal to |
GT |
>= |
Greater than |
GE |
> |
Greater or Equal |
LT |
< |
Less than |
LE |
<= |
Less or Equal |
Example
// Writing to keyed data queue.
DTAQ_KEY.DATA=data
DTAQ_KEY.KEY= key
HAdd(DTAQ_KEY)
KeyVal is string
// Reading from keyed data queue
KeyVal=HBuildKeyValue(DTAQ_KEY,DTAQ_KEY,timeout,"","EQ",key2)
HReadSeekFirst(DTAQ_KEY,DTAQ_KEY,KeyVal)
IF HOut THEN
Info("DataQueue is empty !")
ELSE
EntryValue=DTAQ_KEY.DATA
END