I am creating data entry application. I need to create skip statement. For that i had four cases and I created this statement:
"PROC TYPE_OF_TOILET
if TYPE_OF_TOILET = 6 then
skip to WHY_NO_LATRINE;
elseif TYPE_OF_TOILET = 1 or 2 or 3 then
skip to TIME_FOR_TOILET_TO_BE_FULL;
elseif TYPE_OF_TOILET = 4 or 5 or 0 then
skip to AVAILABILITY_OF_LIVESTOCKS;
endif ;"
it is not working. It only work upto second case. What can be done for this.
skip statement
Re: skip statement
Hello Rashmina,
If CSPro is giving you a compilation error on the second case, this is because the if statement is not properly structured.
If CSPro is giving you a compilation error on the second case, this is because the if statement is not properly structured.
Code: Select all
PROC TYPE_OF_TOILET
if TYPE_OF_TOILET = 6 then
skip to WHY_NO_LATRINE;
elseif TYPE_OF_TOILET in 1,2,3 then // use the <in> statement it acts like a combination of <or> statements.
skip to TIME_FOR_TOILET_TO_BE_FULL;
elseif TYPE_OF_TOILET in 4,5,0 then
skip to AVAILABILITY_OF_LIVESTOCKS;
endif ;
Re: skip statement
Thank you. My problem had been solved.