Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Culbertson
  Where is Paul Culbertson?
 Katy
 Texas - United States
 Paul Culbertson
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Nesting If's in case statements
Thread ID: 501 Message ID: 506 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, June 01, 2001 4:15:47 PM         
   


> > I am trying to nest if's within a case in vfp5, and I am getting a "missing required clause" error, or a "error in docase...endcase" statement. Here is the code:
> >
> > do case
> > case questionres = 6
> > return
> > case questionres = 7
> > do mainfunction
> > case questionres = 2
> > endmes = messagebox ("Are you sure you want to quit?", 4 + 48, "Quit!?!")
> > if endmes = 6
> > quit
> > else
> > continue
> > end if
> > otherwise
> > return
> > endcase
> >
> > Thank you in advance for any help you might be able to provide.
> >
> > Mike
>
> Try the endif without a space between end and if: ENDIF. That'll help.
>
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts

In addition Mike in this area of your code below:
> > case questionres = 2
> > endmes = messagebox ("Are you sure you want to quit?", 4 + 48, "Quit!?!")
> > if endmes = 6
> > quit
> > else
> > continue
> > end if
> > otherwise
> > return

I hope the "continue" was just there to let us know that is a placeholder for code to excute if they choose not to exit. Otherwise remove it.


Paul Culbertson

Home of the Visual FoxPro Experts

Houston, TX


ENTIRE THREAD

Nesting If's in case statements Posted by Mike Dershowitz @ 6/1/2001 1:08:26 PM
RE: Nesting If's in case statements Posted by Eric den Doop @ 6/1/2001 1:17:25 PM
RE: Nesting If's in case statements Posted by Paul Culbertson @ 6/1/2001 4:15:47 PM