Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!gla-aux.uucp!glenn From: glenn@gla-aux.uucp (Glenn Austin) Newsgroups: comp.sys.mac.programmer Subject: Re: Problem with Think C and Polygons! Message-ID: <0E010021.a2n8ad@gla-aux.uucp> Date: 15 Jun 91 05:02:09 GMT Reply-To: glenn%gla-aux.uucp@skinner.cs.uoregon.edu Organization: The Pit Lane Lines: 38 X-Mailer: uAccess - Mac Release: 1.0.4a In article <13974.2857e2a1@ecs.umass.edu>, farmer@ecs.umass.edu (THE MAD MUSKRAT) writes: > In Quickdraw.h the pascal function OpenPoly is defined, but the rest of the > polygon functions aren't. I realize that openpoly is the only function that > returns a value, but the other functions won't work. If I use ClosePoly to > end the polygon definition I get a compiler error: Invalid use of inline > function. What does that mean?? > > The code looks like: > > void LoadLevel (level, theWell) > int level; > PolyHandle theWell[]; > { > int notDone = 1; > Handle res; > res = GetResource ('LEVL', level); > if (!res) exit(1); > for (segments=0; notDone; segments++) { > theWell[segments] = OpenPoly(); > MoveTo(*(*res+(8*segments)),*(*res+(8*segments+1))); > LineTo(*(*res+(8*segments+2)),*(*res+(8*segments+3))); > LineTo(*(*res+(8*segments+4)),*(*res+(8*segments+5))); > LineTo(*(*res+(8*segments+6)),*(*res+(8*segments+7))); > ClosePoly; ^^^^^^^^^ Syntax Error: Missing parens (). Attempted to use function address as ?. Why couldn't they have simply said that the function parens are missing? =============================================================================== | Glenn L. Austin | "Turn too soon, run out of room. | | Macintosh Wizard and | Turn too late, much better fate." | | Auto Racing Driver | -- Jim Russell Racing School Instructors | |-----------------------------------------------------------------------------| | Don't take me too seriously -- I never do! :-) | |-----------------------------------------------------------------------------| | Usenet: glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu | ===============================================================================