Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!stat!fsu!loligo!pepke From: pepke@loligo (Eric Pepke) Newsgroups: comp.sys.mac.programmer Subject: Re: Window Scrolling Problem Message-ID: <398@fsu.scri.fsu.edu> Date: 12 Dec 89 13:29:22 GMT References: <1989Dec8.164905.13550@aucs.uucp> <5764@umd5.umd.edu> Sender: news@fsu.scri.fsu.edu Reply-To: pepke@loligo.UUCP (Eric Pepke) Distribution: na Organization: Supercomputer Computations Research Institute Lines: 44 In article <5764@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes: >I don't know how to make Think C do this. In MPW C I just put the keyword >pascal into the routine declaration, like this example taken from an actual >program: > >/* Called periodically when button is held down in scrolling arrrow. > */ > >pascal ScrollAction(ControlHandle hitctl,short part) It's the same in Think C. Of course, it should probably be pascal void ScrollAction(..... Aside: One of the irritating things about the pascal keyword in Think C is that it is a storage class, which makes it difficult to declare a pointer to a pascal function as a function argument. You have to pretend it is a pointer to a C function and use CallPascal. In this case, the function to which you pass a pascal function has already been declared, so you don't have to worry about it. However, if you ever need to write routines using forms similar to toolbox routines and want to pass them pascal procedure, keep this in mind. >Private complaint: consistency of capitalization of proper names: > >pascal Boolean foo() >^ ^ >Grump I think that Boolean is capitalized to maintain consistency with IM, not that IM is consistent (i.e. INTEGER vs. Integer). "pascal" is an actual keyword, so like all keywords in C, it is in lower case. I once had a C which used all lower case (Megamax), and it was much worse. This is not to say that the capitalization conventions could not be improved, only to say that if it be madness, yet there be method in it. Eric Pepke INTERNET: pepke@gw.scri.fsu.edu Supercomputer Computations Research Institute MFENET: pepke@fsu Florida State University SPAN: scri::pepke Tallahassee, FL 32306-4052 BITNET: pepke@fsu Disclaimer: My employers seldom even LISTEN to my opinions. Meta-disclaimer: Any society that needs disclaimers has too many lawyers.