[Coco] Fw: A bug in Basic09/RunB

Lothan lothan at newsguy.com
Mon Dec 7 20:36:39 EST 2009

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.

More information about the Coco mailing list