Re: TI-86 <REAL> conflicts, pff, BASIC progs


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

Re: TI-86 <REAL> conflicts, pff, BASIC progs



The Daoist wrote:
>
> > BASIC PROGRAMMERS, USE UNIQUE TERMS FOR THOSE TEMPORARY FILES (REAL).
>
> While this may sound like a good idea, I don't think it would work very
> well.
> First, I name important variables weird names, ie "zzzzPOLY", something
> no one else would name a variable. That keeps them relatively safe. I do
> use "simple" names like A,B,C,D for temporary things. Why?
> Think of it this way: If every one who wanted to temporarily store user
> input before do ing something important with it had to make up a new name,
> your calculator's memory would quickly fill up with one-time-used
> variables, each taking a minimum of 17 bytes.
> Secondly, I doubt that every Basic programmer will bow to your whims. ;)
> I suggest you write a program that stores the variables back to your
> original values. You could do it in Basic, if you don't mind that the
> variables would be (real) instead of (cons), but with your handy program,
> why would they need to be constants?
>
> Anyhow, it was a noble idea.
>                                 -keith

Not only a noble idea; it is one of the basic rules of programming:
Always name your variables in a way that points to their use.
It is so much easier to use. Have you ever tried correcting a program
with A,B,C's etc.? It's not very easy...

--
          Rene Kragh Pedersen
------------------------------------------------------------------
make fire
don't know how to make fire.
Why?
Why?: No match.


References: