Odd Feature of Macro Parser
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * Odd "Feature" of the Macro parser. * Posted to SPSSX-L by David Marso on 2000/12/19. *BUT*!! I found an odd 'feature' of the MACRO parser where number letter combinations such as 234C are split into 2 'tokens'. STRING dx1, dx2_1 to dx2_15 (A8). ** THIS DOES NOT WORK CORRECTLY** . DEFINE diagflag (!POS !CMDEND ). !DO !diag !IN ( !1 ) . - COMPUTE FLAGDMM= FLAGDMM OR ANY(!QUOTE(!diag), dx1, dx2_1 to dx2_15). !DOEND. !ENDDEFINE. set mprint on. ** Test OOPS!!!** NUMERIC FLAGDMM. diagflag 1234 234C CODE 666S 333A A33c3d 234c3. exe . ** THIS DOES WORK CORRECTLY ** . DEFINE diagflg2 (!POS !CMDEND ). !DO !diag !IN ( !1 ) . - COMPUTE FLAGDMM2=FLAGDMM2 OR ANY(!diag, dx1, dx2_1 to dx2_15). !DOEND. !ENDDEFINE. set mprint on. ** Test ** . NUMERIC FLAGDMM2 . DIAGFLG2 '1234' '234C' 'CODE' '666S' '333A' 'A333' '234c3'. exe . |
Related pages
...
Navigate from here