>From: "Jeanne A. E. DeVoto" <[EMAIL PROTECTED]>
>Subject: Re: Cases in the switch statement
>Date: Fri, 21 Sep 2001 12:23:53 -0700
>MIME-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>In-Reply-To: <[EMAIL PROTECTED]>
>
>At 11:03 AM -0700 9/21/2001, Gregory Lypny wrote:
>> Can the switch control structure handle inequalities in the cases,
>>such as
>>
>> case > = 0.235 ?
>
>
>Not in that form, but you can use case with a complete expression rather
>than a value:
>
> switch
> case x >= 0.235
> doSomething
> break
> case x < 0.235
> doSomethingElse
> break
> default
> doYetAnotherThing
> end switch
>
>--
>Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
>http://www.runrev.com/
>Runtime Revolution Limited - Power to the Developer!
Jeanne:
What are the conditions in which the default case would be invoked here?
That is, would there be an circumstance under which both "x >= 0.235" and
"x < 0.235" would test out as being false? This gets into when variables
are interpreted as being numbers and thus subject to comparison with other
numbers, I suppose.
John Kiltinen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
John Kiltinen ([EMAIL PROTECTED]) Home Office
Professor, Dept. of Math. & CS Tel.(906) 228-8035 or (906) 227-1600
Northern Michigan University Fax (906) 228-4667 or (906) 2272010
Marquette, MI 49855 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.