[TIB] Re: TI-83 Basic stumper


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

[TIB] Re: TI-83 Basic stumper





Commendations to Robert Mohr.  That's quite
good, and it works too!  Unfortunately, the
LinReg and Equ>String functions don't take
literal lists or Ans as their arguments, and
I don't feel like putting in the overhead
of several new list variables to deal with
that, so I guess "Rogue" will just not display
the number of gold pieces each time.
  Excellent, though.  Proof of concept.
Good hacking.
  (Sorry for late response -- I've been
moving to college and have had little free
time.)

-Arthur

On Tue, 20 Aug 2002, the digest wrote:
> Date: Sun, 18 Aug 2002 21:52:40 -0400 (Eastern Daylight Time)
> From: "Robert Mohr" <rmohr@calcware.org>
> Subject: [TIB] Re: TI-83 Basic stumper
>
> If x is the number you want to convert to a string, use this:
>
> {0,1}->L1
> {x,x}->L2
> LinReg(ax+b) L1,L2,Y0
> Equ>String Y0,Str0
> sub(Str0,4,length(Str0)-3) -> Str0
>
> >From: "Arthur J. O'Dwyer" <ajo@andrew.cmu.edu>
> >Subject: [TIB] TI-83 Basic stumper
> >Date: Sun, 18 Aug 2002 13:50:54 -0400 (EDT)
> > >
> -snip-
> > >   Is there a way in Basic to convert an
> > >integer number to its string representation
> > >in a string variable?  For example, in
> > >my current project, "Rogue", I have piles
> > >of gold pieces which the player can pick
> > >up as in the following snippet:
> > >
> > >   If (player wants to pick up gold)
> > >   randInt(10,100->G                {number of gold pieces}
> > >   Disp "YOU PICK UP THE",G,"GOLD PIECES."
> > >
> > >But that displays as
> > >
> > >   YOU PICK UP THE
> > >                 85
> > >   GOLD PIECES.
> > >
> > >and what I want is more like
> > >
> > >   YOU PICK UP THE
> > >   85 GOLD PIECES.
> > >
> > >which could be accomplished easily
> > >if I could get the value of G into
> > >Str1,...
> > >
> -snip-
> > >-Arthur
> > >ajo at andrew dot cmu dot edu




Follow-Ups: