just getting my feet wet.... question...
Bob Hearn
hearn at claris.com
Sat Mar 18 07:14:28 AEST 1989
>
> I'm just getting my feet wet with a MacII running A/UX and have
>been looking into some of the toolbox stuff - so I read the example 'term'
>source code, and started finding things like:
>
> InsertResMenu(menu,'FONT',0);
>
>where the second argument is supposed to be a ResType, which is a
>long! From the way it looks and works, however, it appears that that
>@!#&! abominable code is the way the Mac expects to see things ? Is
>this possible ?
>
> --mjr();
> mjr at cthulhu.welch.jhu.edu
Notice 'FONT' is in single quotes, not double. Thus it is a character
constant, not a string. Admittedly, K&R only have single-char constants,
but it is a useful extension. The C compiler will happily convert the
4-byte constant to a long. The Mac "expects" a long; it doesn't care how
you specify it. The code looks that way because that's the easiest way to
build a ResType.
Bob Hearn
hearn at claris.com
More information about the Comp.unix.aux
mailing list