Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!isgate!krafla!aries From: aries@rhi.hi.is (Reynir Hugason) Newsgroups: comp.sys.mac.programmer Subject: Re: Variable procedures in Pascal Message-ID: <2434@krafla.rhi.hi.is> Date: 25 Nov 90 20:10:59 GMT References: <1990Nov23.082345.12074@portia.Stanford.EDU> Organization: University of Iceland Lines: 39 As far as I can remember MPW (and Think) only have procedural parameters, i.e. you can only pass a procedure (or a function) to another procedure. No tricky procedural variables. The way it works: PROCEDURE MainWork(PROCEDURE WhoYouGonnaCall(param1: INTEGER; ...)); BEGIN { Do some stuff here } WhoYouGonnaCall(passParam1, ...); { Do more stuff here } END; PROCEDURE DrawingWithColorQD(param1: INTEGER; ...); BEGIN { what-ever } END; PROCEDURE DrawingWithVanillaQD(param1: INTEGER; ...); BEGIN { do something else } END; BEGIN IF (hasCQD) THEN MainWork(DrawingWithColorQD) ELSE MainWork(DrawingWithVanillaQD); END. --- Well that's it basically ... don't see why you don't write a couple classes and make you're life a lot easier ;-) --- Mimir Reynisson Software Island