[TIB] Re: Integral Variables...


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

[TIB] Re: Integral Variables...



I've been told of plenty of things I can't do in BASIC and did as well. 
  But integer math isn't one of them, unfortunately.  TI-89 BASIC has no 
variable types, so that it can do something like 3/2 and return 1.5 (or 
3/2, of course) instead of 1.  68k-BASIC can do that, but only by using 
functions like intDiv(x,y), and without a speed increase i could 
determine.  intDiv() is only there for people who want to test their 
integer arithmatic from inside programs, not for optimization.

> Yeah, yeah...I know all about C.
> 
> But I really do want to use integers.  And, eh, people have told me that I
> can't do plenty of things in BASIC that I've accomplished in some form or
> another anyway.  Just wondering if anyone else had accomplished it without
> having to run amok.
> 
> (continues to wait hopefully)
> 
> ----- Original Message -----
> From: "Robert Mohr" <mohr.42@osu.edu>
> To: <ti-basic@lists.ticalc.org>
> Sent: Tuesday, April 08, 2003 6:05 PM
> Subject: [TIB] Re: Integral Variables...
> 
> 
> 
>>There isn't a way in BASIC to do only integer math, except by using
>>int(), which doesn't help you much.  Look at http://tigcc.ticalc.org/
>>
>>Eric Peterson wrote:
>>
>>>TI-89 question.  And, if it's relevant, I have AMS 2.08 up and running
> 
> on my
> 
>>>calculator.
>>>
>>>I would like to force several of my variables into being
> 
> integers...under
> 
>>>BASIC.  Why?  Because floating point calcs are nasty and long when
> 
> you're
> 
>>>working purely with integers.  Does anyone know of a way to accomplish
> 
> this?
> 
>>>Hopefully,
>>>    Eric
>>>
>>>
>>>
>>>
>>
>>--
>>Robert Mohr
>>mohr.42@osu.edu
>>mohrr@cis.ohio-state.edu
>>
>>
> 
> 
> 
> 
> 

-- 
Robert Mohr
mohr.42@osu.edu
mohrr@cis.ohio-state.edu




Follow-Ups: References: