[Gambas-user] Case statement quesiton
richard terry
rterry at ...1946...
Mon Jul 19 09:06:24 CEST 2010
On Monday 19 July 2010 16:20:49 Dimitris Anogiatis wrote:
> Hey Richard,
>
> Perhaps this might work for you
>
> Select Case BMI < 25
> Case True
> Print "BMI is Less than 25"
> Case False
> Print "BMI is MORE than 25"
> Case Else
> End Select
>
> or you could also set ranges
>
> Select Case BMI
> Case 1 to 24
> Print "BMI is Less than 25"
> Case 25
> Print "BMI is 25"
> Case 26 to 35
> Print "BMI is MORE than 25"
> Case Else
> End Select
>
> Depending on your code's structure and style either one of those
> workarounds will work.
> I tested them myself using Gambas2 2.19 on Linux Mint 9
>
> Regards,
> Dimitris
>
> On Sun, Jul 18, 2010 at 11:02 PM, richard terry <rterry at ...1946...>wrote:
> > Select Case BMI
> > Case < 25
> >
> > This dosn't seem to work? can't one use less than, greater than, <> etc?
> >
> > Regards
> >
> > Richard
> >
> >
> >
> >
> > -------------------------------------------------------------------------
> >----- This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> ---------------------------------------------------------------------------
> --- This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
good idea's I'll try these tomorrow.
REgards
richard
More information about the User
mailing list