TIB: Re: Help quick! 82 to 83 conversion trouble


[Prev][Next][Index][Thread]

TIB: Re: Help quick! 82 to 83 conversion trouble




I'll take a look at it tomorrow at school (I only have an 82 and an 86, but
most of my friends have 83's), but I think that the int problem is the only
thing. Go ahead and put an extra set of parentheses around the code there.
It would look like this:

:int (rand(53-A)+1)->Z

There is a command on the 83 called randInt(. It does the same thing, but
perhaps a little bit faster. The code would look like this on the 83:

:randInt(53-A)+1->Z

I think that would work.

Bryan Bates
ishfish@usa.net


----- Original Message -----
From: Vimm <vimm@vimm.net>
To: <ti-basic@lists.ticalc.org>
Sent: Thursday, May 27, 1999 3:04 PM
Subject: TIB: Help quick! 82 to 83 conversion trouble


>
> I have a problem that I really need solved tonight.  I've spent the past
> couple of weeks writing a game for a classmate who has a TI-83, so I
> decided to write it in Basic since I have an 82.  I finally finished it
> last night and when I gave it to him today it produced an error.  I
> spent a few minutes looking at the code and couldn't find anything
> wrong.  On top of that I'm graduating tomorrow and probably will never
> have another chance to givce it to him after tomorrow, so I need to fix
> it before then!  Can anyone help me out?  Here's the TI-82 code.  It's
> supposed to generate 52 numbers in L4 and then randomly move them to
> L5.  It works fine on my TI-82 but seems to suffer in the translation.
>
> This is the TI-82 code...
> (Generates 13 sets of 4 numbers 3-15 in list 4 (ex. 3,3,3,3,4,4,4,4,
> etc.))
> :52->dim L4
> :52->dim L5
> :For(A,0,12
> :For(Z,1,4
> :A+3->L4(4A+Z
> :End
> :End
> (The part above seems to work fine)
> (Randomly moves all numbers in L4 to L5)
> :For(A,1,52
> :int rand(53-A)+1->Z
> :L4(Z)->L5(A
> :0->L4(Z
> :SortD(L4
> :52-A->dim L4
> :End
>
> Hmm...Cut and paste didn't work.  I edited it to make it understandable.
>
> (Substituted -> for store command)
> The command that generates the random number isn't working right on the
> TI-83.
> I noticed the int command on the 83 is int(.  Do I need another
> parenthesi or something?  It's not randomly generating a number on the
> 83.  Can someone please help me out?  I don't have a TI-83 so I don't
> know how to fix it!  I want to be able to send from my TI-82 to an 83
> and have it work on both.  Can anyone help?  Please!  I don't want all
> of my work to go to waste over this one little error....
>
> Vimm
>
>
>
>
>



References: