[Coco] Fw: A bug in Basic09/RunB

Wayne Campbell asa.rand at gmail.com
Mon Dec 7 20:52:08 EST 2009


That makes sense, and explains more to me. I would say that the memory 
tightness back in those days explains alot too, since the Basic09 program 
module is already pushing the limit for how big it can be and still function 
(23K, which is enormous compared to most other OS-9 memory modules). It may 
well be that there just wasn't enough room to fix everything. Basic09 does 
have very good parameter passing/checking otherwise. In most cases I've 
seen, receive parameters are identical to passed parameters, in size and 
type, arrays get passed to arrays, and records usually aren't defined more 
than one field level deep.

I have done experimentation with very complex types, including 
rec.fld1.fld2.fld3.fld4. As far as the procedure they are defined in is 
concerned, all calculations that involve them are correct. It is only in 
trying to pass a field deeper than one level as a parameter that is broken. 
Entire record structures are passed without problem, so long as the 
receiving variable is the same size.

It would be nice to see if these problems can be corrected without causing 
Basic09 to become too large. However, I can understand if noone wants to do 
that work. It is, after all, implementing features not originally found in 
the program.


----- Original Message ----- 
From: "Lothan" <lothan at newsguy.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Monday, December 07, 2009 5:36 PM
Subject: Re: [Coco] Fw: A bug in Basic09/RunB

> --------------------------------------------------
> From: "Wayne Campbell" <asa.rand at gmail.com>
>> I changed the test again, and tried putting the 3-int array into 3 ints. 
>> The
>> parameter error occurred on the first int, so I guess this means it 
>> doesn't
>> work the other way, even though it should, going by the fact that the 
>> manual
>> says no type checking is done.
> Very few languages back in those days checked or even knew anything about 
> parameters and/or parameter types. Even the original K&R C language left 
> it up to the developer to ensure the proper parameters and parameter types 
> were passed to each method. Memory was just too tight back in those days 
> to allow type checking, parameter validation, and so forth.
> That doesn't necessarily mean that calling blah(int a, int b, int c) is 
> the same as calling blah(int[] a), though. In the case of C for example, 
> the first instance pushes three integer values onto the stack whereas the 
> second instance pushes a pointer to an integer array onto the stack. I 
> suspect Basic09 has some similar differentiation between integer 
> parameters and array parameters.
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 

More information about the Coco mailing list