Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!nosc!manta!grantk From: grantk@manta.NOSC.MIL (Kelly J. Grant) Newsgroups: comp.lang.postscript Subject: Re: HELP! Bug in blue book ? Summary: Found it.... Message-ID: <1007@manta.NOSC.MIL> Date: 3 Feb 90 00:23:18 GMT References: <1006@manta.NOSC.MIL> Organization: Computer Sciences Corporation Lines: 42 In article <1006@manta.NOSC.MIL>, grantk@manta.NOSC.MIL (Kelly J. Grant) writes: I found the problem. In the process of displaying the text, the 'outsidecircletext' does a 'forall' loop through the input string. It gets each character AS AN 'int' type in the body of the procedure! It then must send each character to the procedure that actually places the date on the page. The lower procedure is expecting an argument of type 'string', as it is doing some calculations followed by a 'show' of the stack argument. The bug is in the 'outsidecircletext' line that follows: () dup 0 charcode put outsideplacechar This is the effect of this line (as I understand it :-) A blank string is put on the stack It is duplicated 'charcode' is 'put' at position 0 of the first string. The problem is, 'put' doesn't leave anything on the stack! The originally blank string is modified, but this isn't saved into anything, and is subsequently lost. The only thing on the stack after 'put' is the original blank string. Here is my fix: /s 2 string def %% possibly unnessary, but like I said, I'm not good s 0 charcode put %% don't understand why a 'def' isn't necessary here s outsideplacechar It may just be dumb luck, but it works now. Anyway, thanks for listening. Kelly -- Kelly Grant grantk@manta.nosc.mil (619) 225-8401 Computer Sciences Corp ^^^^^^^^ Important: manta.UUCP won't get to me 4045 Hancock Street "If you are given lemons.....see if you can trade for San Diego, CA 92110 chocolate" - me