Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

TOPIC:

icase question 25 Oct 2021 18:22 #20114

  • kevclark64
  • kevclark64's Avatar
  • Topic Author


  • Posts: 120
  • 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.
    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

    Please Log in or Create an account to join the conversation.

    icase question 25 Oct 2021 19:41 #20120

    • Karl-Heinz
    • Karl-Heinz's Avatar


  • Posts: 765
  • Hi Kevin,

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

    regards
    Karl-Heinz

    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

    Please Log in or Create an account to join the conversation.

    icase question 25 Oct 2021 22:17 #20123

    • kevclark64
    • kevclark64's Avatar
    • Topic Author


  • Posts: 120
  • You're right, ICASE doesn't give an error in a new program. Maybe what I'm seeing is a cascade from other errors.

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1