Re: A92: Suggestions... tokenization


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

Re: A92: Suggestions... tokenization



Francois Bradet wrote:

> >The plain old TI-92 already does tokenization, as do *all* of the TI
> >graphing calculators.
> My own tests prove that wrong.
> I've created three programs. The first one consists of empty lines.
> The
> second one
> consists of one empty line and solve(4*x^2+5*x+6=3*y,x). The third one
>
> consist of
> two times solve(4*x^2+5*x+6=3*y,x). The sizes of those programs are:
> 29, 53,
> 77.
> The length of solve(4*x^2+5*x+6=3*y,x) is 24 characters. 53 = 24 + 29.
> 77 =
> 29 + 24 + 24.
> Each program has the same number of <enter>s in it. It suggests that
> the 92
> stores
> the program as plain ASCII, without doing tokenization or compression.
> Of
> course, I
> could be wrong.

                         Yes.

Your test was the wrong one. To prove tokenization is very simple.
write a program like the following:
prgm
ceiling (123)
endprgm
then go to the home, and start the var-link screen. The size of the var
is 40Bytes.
If you execute the program and watch the size again, it has been
shrunked to 20Bytes.
So the tokenization is made, before a program is executed.
I realized this soon, when I wrote large TI-Baasic programs. If you have
programs greater than 10KBytes, it will pass some seconds, before they
can be executed after editing. When you want to edit the program again,
it also takes some seconds to translate it back to ASCII


Follow-Ups: References: