User bio

my video https://youtu.be/zx6WoApljBI
my business story https://community.intersystems.com/post/45-years-intersystems-1978-2023

  • main languages: German, English, Italian, French, Spanish, Latin, ..
  • private: married since 1969, 3 successful children

  

Member since Jul 21, 2017
Replies:
  1. With your #define, you create a sequence of lines. NOT a method !!
  2. So the final quit is wrong. 
    But this works:
  3. #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
  4. // the generated int code:
     
  5. a 
     set tQStr="" for { 
     set key=$order(pQArray("")) quit:key="" 
     set tQStr=tQStr_"##"_key 
     } 
    zw     
    
set Names="A,B,Y,Z"
set A=$L(Names,",")
for I=1:1:A set G="^"_$LI($LFS(Names),I) set @G="" write $zr,! 

not correct. SINGLE line ELSE is part of Objectscript since ever
You just need a double space after the ELSE

USER>p 
ck       read "?",x,! 
         if x?.N write "numeric",! 
         else  write "other",! 
         goto ck 
USER>d ck 
?5 
numeric 
?a 
other
Open Exchange applications:
Certifications & Credly badges:
Robert has no Certifications & Credly badges yet.
Followers:
Following: