Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!caen!zaphod.mps.ohio-state.edu!ub!csn!magnus.acs.ohio-state.edu!sample.eng.ohio-state.edu!purdue!news.cs.indiana.edu!mips!swrinde!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!linus!linus!mitre.org!gmarzot From: gmarzot@mitre.org (G. S. Marzot (Joe)) Newsgroups: comp.sys.mac.programmer Subject: Re: Problem with Think C and Polygons! Message-ID: <1991Jun14.172417.11993@linus.mitre.org> Date: 14 Jun 91 17:24:17 GMT Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation Lines: 45 > 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; > > if (*(*res+(8*segments+4)) == 0 && *(*res+(8*segments+5)) == 0) notDone=0; > > }; > >} this is a little embarassing but how about "ClosePoly();" instead of "ClosePoly;" -gsm ex-pascal programmers unite! Email: gmarzot@linus.mitre.org (standard disclaimer)