sakw@cvaxa.UUCP (Sak Wathanasin) (05/30/86)
This is some stuff that appeared on MacTel, a UK BBS devoted to the Mac. -- Category: 1 MAC Information Message #: 668 Submitted: 4/29/86 11:49 Submitted by: JOHN HILL Subject: A Macintosh Pascal bug. I have encountered a fault in the way in which Macintosh Pascal (release 1.0) handles subrange types. The program below gives the context in which the problem occurs: program test; const c1 = 4; c2 = -2; type subrange = c2..c1; var i1 : integer; sub, f : subrange; begin for f := c2 to 0 do begin writeln('f =', f); for i1 := c2 to c1 do begin sub := f; sub := i1; writeln(i1, sub); end; end; end. Execution of this program gives the following results: f = -2 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 f = -1 -2 -257 -1 -1 0 255 1 511 2 767 3 1023 4 1279 f = 0 -2 -2 -1 -1 0 0 1 1 2 2 3 3 4 4 Other, equally bizzare, effects can occur when a subrange type is manipulated and a -1 is involved. For example, the consequence of sub:= f; when f = -1 and sub has not been previously assigned has been observed to be that sub is set to -256. Perhaps more reasonably, when sub has been set to 255 as in the table, the operation sub := sub + 0; is reported as illegal. Is this a known Pascal defect? Is there a later version of Macintosh Pascal in which it is corrected? MacUser Magazine please feel free to publish this material. Regards, John Hill. Category: 1 MAC Information Message #: 787 Submitted: 05/21/86 21:56 Submitted by: KEITH LANDER Subject: Re: BILLBOARD COMMENTS I think you will find that the Basel outlined problem is a Quickdraw bug. Certain outlined/shadowed large font strings can cause problems. Category: 1 MAC Information Message #: 789 Submitted: 05/21/86 22:05 Submitted by: KEITH LANDER Subject: Re: Slow pri [Sak - line noise removed here; this is in response to my query about slow printing with LW 3.0, which I also posted to Usenet.] I spoke to Cupertino the other evening about 3.0 and they confirmed that it has problems. MA occasionally produces a garbage page with it and sometimes bombs with an ID02. It looks to me as if they fail to lock down the print record passed to them. Category: 1 MAC Information Message #: 790 Submitted: 05/21/86 22:11 Submitted by: KEITH LANDER Subject: Re: Slow scrapbook. There is a bug, but I can't remember what it is. I've a feeling it was either Finder 5.1 or System3.1. Category: 1 MAC Information Message #: 796 Submitted: 05/22/86 18:43 Submitted by: PAUL RUSSELL Subject: Re: Another DA funny. Re DA bombs under Finder versions 5.0 and later - there is a ***TERRIBLE*** problem with DA's under these new-fangled modern finders! I spent ages proving that it was down to the Finders and locating the problem area. The DA's which will bomb are those which keep a MENU resource in the System file (this is what good programmers do - fortunately most DA writers seem to have been bad programmers and have built their own menus without using separate resources). What happens is that a call to _GetRMenu when the menu resource is already in memory cause a bomb - in other words, once you have opened a desk accessory, closed it and opened it again (or deactivated and re-activated it) you are likely to get a bomb when the DA tries to put its menu back up on the menu bar. There is a programming work-around which I have evolved to let you do good programming and not get the bombs but its a bit late for any DA's written before the emergence of these rogue Finders (which cause problems because they do direct jumps into the ROM (on a 512k Mac anyway, dunno about Mac Plus)). Phew, hope that helps... Paul Category: 1 MAC Information Message #: 809 Submitted: 5/15/86 19:49 Submitted by: PAUL MUSTON Subject: TML Pascal problems I have been using TML Pascal on MacPlus + ext 800k drive. By the way, the HFS can cause problems for compilations. What you need to do is to make sure you have no spaces in your folder or filenames. Change your incl ude lines to include the folders your Pascal system files are on. I use $I PAscal:PasLib:MemTypes.ipas say. Also remember the resource file eg $L PasExam:Grow:Grow/Rsrc. In your include files the $U needs changing ie $U Pascal:PasLib:OSTraps.Rel. The resource file also needed changing ie PasExam:Grow:Grow/Rsrc.Rel (at the top under the comments). Also you need to change where the Pascal Runtime libraries are read from. In the compiler options PAS$Library path include your folder as before eg Pascal:PasLib: remember to save your options using Save Options (File menu). --- Happy Application (or Accessory writing) ------- Back to my problem. Has anyboby else out there had trouble compiling QDSample.pa s my problem is that when the compiler gets to the routine DrawIcon it splits out the disk in the external drive!!!! I have commented out this routine and where it is called and the compiler is happy. I have also trimmed down the program - retaining this routine - but it still screws it up. I has also trashed the disk in this drive once, after i reinserted the disk later. Beware - if this happens to me now I reset the mac. Anyway, any answers out there. I anybody wishes to talk to me during the daytime. Im on 0532-441111 Ext 211. If Im a bit short with you on the phone, my boss is in the office. Paul -- Sak Wathanasin, U of Sussex, Cognitive Studies, Falmer, Sussex BN1 9QN, UK uucp: ...mcvax!ukc!cvaxa!sakw arpa: sakw%cvaxa.sussex.ac.uk@ucl.cs.ac.uk janet: sakw@uk.ac.sussex.cvaxa