[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: K&R C Questions
On Sep 2, 9:51 am, Harry Potter <maspethro...@aol.com> wrote:
> I want to produce and use C compilers for Commodore computers. I
> tried asking these questions in the appropriate newsgroup
> (comp.sys.cbm) but received no adequate response: How do I define a
> function with no parameters? What libraries and library functions are
> available? How do I handle the passing of non-int parameters? Are
> they converted to ints, or are they passed in the size of the
> operation? BTW, I may create it for the Apple 2--if I actually finish
> the Commodore versions. :)
> ---------------
> Joseph Rose, a.k.a. Harry Potter
> Working magic in the computer community...or at least striving to! :(
Functions with no parameters are defined like:
// return type is assumed as int
f()
{
...
}
// explicit return type
float f()
{
...
}
Functions with non-int params:
f(x, y, z)
float x, int y, double z;
{
...
}
Most C implementations pass value parameters through the stack, each
value can have different number of bytes used.
Why not produce an ANSI C compiler instead of K&R?