[GiDlist] If (strcmp) statement
Posted: Tue Jun 14, 2011 6:55 am
Dear All,
I have written part of my .prb file (lines 10 and 11) as below:
QUESTION: Climate_Pattern_(NPATT):#CB#(Sinusoidal_Climate_Change,Constant_Climate_Change)
VALUE: Sinusoidal_Climate_Change
and I have an if statement in my .bas file as
*If(strcmp(Gendata(10),"Sinusoidal_Climate_Change")==0)
1 *\
*elseif(strcmp(Gendata(10),"Constant_Climate_Change")==0)
0 *\
*endif
But I don't get a value of 0 or 1 in the results file (whether I choose the first or second option).
Do you have an idea of what I am doing wrong?
Best Regards,
Arash Farzam
I have written part of my .prb file (lines 10 and 11) as below:
QUESTION: Climate_Pattern_(NPATT):#CB#(Sinusoidal_Climate_Change,Constant_Climate_Change)
VALUE: Sinusoidal_Climate_Change
and I have an if statement in my .bas file as
*If(strcmp(Gendata(10),"Sinusoidal_Climate_Change")==0)
1 *\
*elseif(strcmp(Gendata(10),"Constant_Climate_Change")==0)
0 *\
*endif
But I don't get a value of 0 or 1 in the results file (whether I choose the first or second option).
Do you have an idea of what I am doing wrong?
Best Regards,
Arash Farzam