Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!gatech!udel!rochester!pt.cs.cmu.edu!henry.ece.cmu.edu!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: problem with PenPat() calls in THINK C Message-ID: <13134@pt.cs.cmu.edu> Date: 21 May 91 04:23:14 GMT References: <1991May20.092307.29916@beaver.cs.washington.edu> <53110@apple.Apple.COM> Distribution: na Organization: Gaia II Lines: 31 [chou@cs.washington.edu (Pai Chou) writes:] [] I have problems with PenPat() in THINK C's console window. [] ... [] But if I call PenPat(black) or any pattern at all, [] then the same Line() or LineTo() will not draw anything. [] I also tried PenPat(&black) but it doesn't make a difference. [] My program does not crash in either case. [stevec@Apple.COM (Steve Christensen) writes:] [] For C you should be using PenPat(&qd.black). The Inside Mac documentation [] was written primarily for Pascal which automatically handles the "&qd." [] part... that's MPW C ... Think C defines Pattern: typedef unsigned char Pattern[8] and uses: extern Pattern black; and so on. so the call in Think C is PenPat(black), for example. however, in special cases, the compiler ignores the address operator on an array variable, thus PenPat(&black) is equivalent to PenPat(black). as to why this doesn't work in the console window, i dunno, are you setting the port to that window? -dave- hairston@henry.ece.cmu.edu