xsharp.eu • icase question
Page 1 of 1

icase question

Posted: Mon Oct 25, 2021 4:22 pm
by kevclark64
Do conditions used in ICASE need to have parentheses around them? It seems like they do, but I wonder if I'm just doing something wrong.

Code: Select all

lcdiplomatype=ICASE((eid_retval="G"),"General",(eid_retval="A"),"Advanced",(eid_retval="N"),"Non-Diploma","Standard")  //no error
lcdiplomatype=ICASE(eid_retval="G","General",eid_retval="A","Advanced",eid_retval="N","Non-Diploma","Standard")  //compiler error XS1739

icase question

Posted: Mon Oct 25, 2021 5:41 pm
by Karl-Heinz
Hi Kevin,

i tried this, and it works as expected. /Fox2 enabled or disabled makes no difference.

regards
Karl-Heinz

Code: Select all

FUNCTION Start() AS VOID
PRIVATE eid_retval 
PRIVATE lcdiplomatype
	          
	eid_retval = "A"
	
	lcdiplomatype=ICASE(eid_retval="G","General",eid_retval="A","Advanced",eid_retval="N","Non-Diploma","Standard") 
    
	? lcdiplomatype   && "Advanced" 
	
	RETURN

icase question

Posted: Mon Oct 25, 2021 8:17 pm
by kevclark64
You're right, ICASE doesn't give an error in a new program. Maybe what I'm seeing is a cascade from other errors.