Hello,
I've got a problem with my macro.
Here is the first part of it.
%macro castypes(table,x1=,x2=nul,x3=nul,x4=nul,x5=nul) ;
/* nombre de modalités*/
%let i=1 ;
%do %while(&&x&i NE nul) ;
%let i=&i+1;
%end ;
%mend ;
options symbolgen mlogic mprint ;
%castypes(table=estgen,x1=pauvretot,x2=typomen) ;
At the end "i" should resolve to 3.
Log tells me that he's expecting something numeric in the while condition.
Yet the following program works :
%macro castypes(table,x1=,x2=nul,x3=nul,x4=nul,x5=nul) ;
/* nombre de modalités*/
%let i=1 ;
%do %while(&&x&i=nul) ;
%let i=&i+1;
%end ;
%mend ;
options symbolgen mlogic mprint ;
%castypes(table=estgen,x1=pauvretot,x2=typomen) ;
Since x1 resolves to pauvretot, the condition is wrong the first time. But at least the program works.
What's wrong with the first program ?
Thank you.