structured assembler (BASIC) [Really: C builtin functions?]
John Owens
jso at edison.UUCP
Fri Apr 25 01:29:55 AEST 1986
> You are sort of right, but sizeof qualifies as a builtin function,
> even though it is a compile-time function vs run-time. Anyone disagree?
>
> Paul Guthrie `When the going gets weird,
> ihnp4!ihdev!pdg The weird turn pro'
> - H. Thompson
Yes. Try this on your favorite C compiler and tell me if you still
think that "sizeof" is a function as opposed to an operator.
main()
{
int a;
printf("%d\n",sizeof a); /* note no parentheses */
}
John Owens @ General Electric Company (+1 804 978 5726)
edison!jso%virginia at CSNet-Relay.ARPA [old arpa]
edison!jso at virginia.EDU [w/ nameservers]
jso at edison.UUCP [w/ uucp domains]
{cbosgd allegra ncsu xanth}!uvacs!edison!jso [roll your own]
More information about the Comp.lang.c
mailing list