... C builtin functions?

Alex Colvin mac at uvacs.UUCP
Sat Apr 19 02:24:39 AEST 1986


> > >C has standard built-in functions????
>   
> > Well, how about sizeof(foo)?

As has been pointed out, SIZEOF is not a function, it's an operator, like
"++".

Functions are often built-in in languages such as PASCAL, PL/I, FORTRAN,
etc. because they require special syntax (formats in the argument lists,
isubs) or information not kept at runtime (size of object, types of
arguments).  These must be wired in to the compiler.

C uses the fixed set of builtin operators for most of these cases.
Variable argument lists (printf), the typical sign of a built-in, are
handled otherwise in C.

See Algol68 for another language with operators but no need for BIFs.
Algol68's greatest success seems to be as an influence on C.



More information about the Comp.lang.c mailing list