Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!wupost!waikato.ac.nz!comp.vuw.ac.nz!actrix.gen.nz!dempson Newsgroups: comp.sys.apple2.programmer Subject: Re: Orca Pascal 2.0 Message-ID: <1993Jul15.121855.23710@actrix.gen.nz> From: dempson@swell.actrix.gen.nz (David Empson) Date: Thu, 15 Jul 1993 12:18:55 GMT Sender: dempson@actrix.gen.nz (David Empson) References: <1993Jul14.012824.143@pro-palmtree.socal.com> Organization: Actrix Information Exchange Lines: 61 In article <1993Jul14.012824.143@pro-palmtree.socal.com> klee@pro-palmtree.socal.com (Kevin Lee) writes: > I've just recently got Orca Pascal 2.0 and I have a question... > How do I use a unit like QuickDrawII in my main program > and then compile it and link it and whatever. > Thanks for any help. The "uses" clause is all you need to know about, unless you're writing your own UNITs. The ORCA/Pascal library is automatically linked in whenever you link the program. If you write your own units, you have to link them explicitly, as well as USE them in the main program. Read chapter 4 of the ORCA/Pascal manual (Programming on the Apple IIgs). The section on "Graphics Programs" shows how to write simple programs which use QuickDraw but no higher-level parts of the toolbox. If you need to know how to use QuickDraw, it is documented in Toolbox Reference Volume 2. Your program would look something like this: PROGRAM whatever; USES Common, QuickDrawII; { Anything else you need in here } BEGIN StartGraph(320); { Assuming you only need QuickDraw } { or StartGraph(640); } { Use QuickDraw } EndGraph; END. If you're using the text-based shell, you could compile and run this program using: compile whatever.pas keep=whatever link whatever keep=whatever whatever or cmpl whatever.pas keep=whatever whatever or run whatever.pas keep=whatever It is even easier in PRIZM, but I haven't used it for so long that I can't remember what the menu commands are. :-) -- David Empson dempson@swell.actrix.gen.nz Snail mail: P.O. Box 27-103, Wellington, New Zealand