Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!claris!hearn From: hearn@claris.com (Bob Hearn) Newsgroups: comp.unix.aux Subject: Re: just getting my feet wet.... question... Keywords: is this real?! Message-ID: <9092@claris.com> Date: 17 Mar 89 21:14:28 GMT References: <2876@osiris.UUCP> Reply-To: hearn@claris.com (Bob Hearn) Organization: Claris Corporation, Mountain View CA Lines: 24 > > 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@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@claris.com