- With your #define, you create a sequence of lines. NOT a method !!
- So the final quit is wrong.
But this works: -
#define ArrayToString(%array,%out,%del) ##continue set %out="" for { ##continue set key=$order(%array("")) quit:key="" ##continue set %out=%out_%del_key ##continue } a $$$ArrayToString(pQArray,tQStr,"##") zw - // the generated int code:
-
a set tQStr="" for { set key=$order(pQArray("")) quit:key="" set tQStr=tQStr_"##"_key } zw
- Log in to post comments