[Coco] Copying over an IO ERROR

Johann Klasek johann+coco at klasek.at
Tue Feb 3 16:55:07 EST 2015


On Tue, Feb 03, 2015 at 02:29:58PM -0700, William Astle wrote:
> Also, the DIM statement on line 10 is not required. DECB will happily 
> define any variable the first time it is encountered so predefining them 
> with DIM is not needed.
> 
> Some experimentation shows that DIM with scalar variables does define 
> the scalar variables, though, even though it's only documented for use 
> in defining arrays. (At least I don't remember any official DECB type 
> references indicating DIM with scalar variables.)

DIM with scalar is a nice way to define the order which variable appears
first in the variable table to get the fastest access for often used variables
(e.g. loop variables). 
No dummy assignements needed. ;)
I personally find this basic optimization technique for MS class BASIC
interpreters (CBM basic variants) very useful especially in greater programs.




More information about the Coco mailing list