From: "Jeffrey Drake" Newsgroups: comp.os.msdos.djgpp Subject: Re: Check a range of numbers with case Date: 6 May 1997 02:29:52 GMT Organization: iSTAR internet Incorporated Lines: 54 Message-ID: <5km530$6kv@nr1.toronto.istar.net> References: <0000jjzjjbzl DOT 0000iswkaeyu AT dca DOT gov DOT au> NNTP-Posting-Host: news.lonet.ca Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01BC59A3.973B04A0" Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_01BC59A3.973B04A0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit DBerry1 AT dca DOT gov DOT au wrote in article <0000jjzjjbzl DOT 0000iswkaeyu AT dca DOT gov DOT au>... > > I've slowly been working my way through learning C and DJGPP, and I was > wondering if it's possible to use a Case statement to check for a range of > numbers - not just one.... > > eg.. > > Switch (bullet_x) > > Case (alien1_x to alien1_x + 16) > then alien_hit = 1 > Case (alien2_x to alien2_x + 16) > then alien_hit = 2 > Default > alien_hit = 0 What language is this? C has semicolons, braces. Not then??? > -- Jeffrey Drake jdrake AT lonet DOT ca www.lonet.ca/res/jdrake/homepage.html ------=_NextPart_000_01BC59A3.973B04A0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

DBerry1 AT dca DOT gov DOT au wrote in article <0000jjzjjbzl DOT 0000iswkaeyu AT dca DOT gov DOT au>...
>
> I've slowly been working my = way through learning C and DJGPP, and I was
> wondering if it's = possible to use a Case statement to check for a range of
> = numbers - not just one....
>
> eg..
>
> Switch = (bullet_x)
>
>   Case (alien1_x to alien1_x + = 16)
> then alien_hit =3D 1
>   Case = (alien2_x to alien2_x + 16)
> then alien_hit =3D 2
> =   Default
> alien_hit =3D 0
What language is = this? C has semicolons, braces. Not then???
>

-- =

Jeffrey = Drake
jdrake AT lonet DOT ca
www.lonet.ca/res/jdrake/homepage.html

------=_NextPart_000_01BC59A3.973B04A0--