[Coco] Question about BASIC coding guidelines
Bill Barnes
da3m0n_slay3r at yahoo.com
Thu Oct 30 15:03:20 EDT 2008
Based on this, it would be faster to make all numeric constants within a program to be assigned to a variable within basic. Only drawback is if you accidently modify the value of the variable, as the CoCo BASIC doesn't allow for c constant variable.
-Later!
-WB- -- BABIC Computer Consulting.
--- On Thu, 10/30/08, Darren A <mechacoco at gmail.com> wrote:
From: Darren A <mechacoco at gmail.com>
Subject: Re: [Coco] [Color Computer] Question about BASIC coding guidelines
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Date: Thursday, October 30, 2008, 1:54 PM
On 10/30/08, James Diffendaffer wrote:
>
> I know some BASICs tokenize the number (store it as a 16bit integer)
> which makes the code smaller and faster (ok... if you don't get out of
> single digit line numbers it might not be smaller). I don't remember
> what the CoCo does.
>
The CoCo does not tokenize the line numbers following GOTO, GOSUB and
THEN. It performs an ASCII to Integer conversion every time such a
statement is executed. Likewise, literal numbers in expressions must
go through an even lengthier ASCII to FP conversion.
Darren
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list