IF IND='P' THEN DYNDATA="'4','INVALID CHOICE'"
ELSE DYNDATA="'5','AGAIN"
XX = FUNC(VAL,'1','RED','2','WHITE',
'3','NO COLOR',DYNDATA,' ',' ')
FUNC:
DO I = 2 TO ARG() BY 2
SAY ARG(I) ';' ARG(I+1)
END
RETURN 0
ELSE DYNDATA="'5','AGAIN"
XX = FUNC(VAL,'1','RED','2','WHITE',
'3','NO COLOR',DYNDATA,' ',' ')
FUNC:
DO I = 2 TO ARG() BY 2
SAY ARG(I) ';' ARG(I+1)
END
RETURN 0
Required Output:
1;RED
2;WHITE
3;NO COLOR
4;INVALID CHOICE
I am getting the 1,2,3 correctly but for 4/5, depending upon the IND I have set the DYNDATA dynamically and use it into FUNC.
But when I am passing DYNDATA as "'4','INVALID CHOICE'", not getting the correct output (4,INVALID CHOICE; ).
Any suggestion?