[Coco] Copying over an IO ERROR

Allen Huffman alsplace at pobox.com
Tue Feb 3 17:13:06 EST 2015


> On Feb 3, 2015, at 3:29 PM, William Astle <lost at l-w.ca> 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.

Yep, just a "bad habit" for efficiency. Declaring variables allocates them up front, so when they are first used it doesn't have to do it then and possibly shift things around.

> 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.)

Nope -- I picked it up from, most likely, some Rainbow column on BASIC tricks.

		-- A


More information about the Coco mailing list