Re: TIB: case statement
[Prev][Next][Index][Thread]
Re: TIB: case statement
On Wed, 24 Sep 1997 20:15:11 -0700 (MST) Jesse.Samuels@asu.edu writes:
>I remember in BASIC and Pascal we did stuff like:
>rand(9)-->n
>
>case n
> 1:print "one"
> 2:print "two"
>endcase
>
>is there...
Here's what I do, and for your purposes it works the same as an actual
case statement:
:int 9rand\->\R
:"zero one two threefour five six seveneight"\->\S
:Disp sub(S,5R+1,5
OR
:int 9rand\->\R
:Disp sub("zero one two threefour five six seveneight",5R+1,5
Either way will work the same, you just need to use the first way if you
use the same string more than once.
If you're wanting a way on the 82, sorry there isn't one(no string
variables, just string literals).
Sincerely,
The Unibomer
Jared Ivey
Unibomer@Juno.com
Ham Call Sign: KF4BXL
The Unibomer's Shack:
http://www.geocities.com/SiliconValley/Vista/7342/
_______________________
| Florida Times Union |
|=======================|
| Unibomer Strikes Again|
| ~~~~~~~~~~~~~~~~~~~ |
| ~~~~~~~~~~~~~~~~~~~~~ |
| ~~~~~~~~~~~~~~~~~~~~~ |
| ~~~~~~~~~~~~~~~~~~~~~ |
| ~~~~~~~~~~~~~~~~~~~~• |
|_______________________|
References: