Re: voting on GOTO

new topic     » goto parent     » topic index » view thread      » older message » newer message

Euler German wrote:
> 
> > On 5 Jun 2008 at 15:28, Derek Parnell wrote (maybe snipped):
> 
> > posted by: Derek Parnell <ddparnell at bigpo??.com>
> > 
> > Euler German wrote:
> > 
> > > Just to add that there are times when I really miss a DO CASE case
> > > this ... case that ... other[wise] ... END CASE construct. But I can
> > > wait. :)
> > 
> > 
> > This construct has been implemented in v4.0 and I'm doing some
> > extensive testing with it. It works very well and makes code look a
> > lot cleaner. eg.
> > 
> >    switch upper(SOMEVAL) do
> >        case "ME":
> >        case "MYSELF":
> >        case "I":
> >               foo()
> >               exit
> > 
> >        case "YOU":
> >        case "THEM":
> >              bar()              
> >              -- fall thru
> > 
> >        case "HE":
> >        case "SHE":
> >              qwerty()
> >             exit
> > 
> >        case else:
> >              default()
> > 
> >     end switch
> > 
> That's what I was talking about! Job well done guys. You have my 
> endless sympathy. :)
> 
> And though "else case" sounds a bit weird I can live with that. ;)
> 
> -- 
> _
> _| euler f german
> _| sete lagoas, mg, brazil
> _| efgerman{AT}gmail{DOT}com
> 
> 

'case else' disambiguates from if/else

Chris Bensler
Code is Alchemy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu