PostScript bug!?!?!?

Martin Liversage operator at IRIS.KTH.DK
Fri Dec 7 19:26:35 AEST 1990


> Look out!  Looks like the calculator is buggy...
>	-chuck

No! The calculator is not buggy... The newsserver is. Try this one

-----------------------------------------------------------------
#! /bin/psh

%
% Bug in newsserver PostScript?
%
% Martin Liversage - 90.12.07 09:18:19
%

/Denom 5 def

/Test {
  3000 100 8000 {
    (/) 1 index         % stack: n (/) n
    Denom mul           % stack: n (/) Denom*n
    (=) 3 index 2 index % stack: n (/) Denom*n (=) n Denom*n
    div                 % stack: n (/) Denom*n (=) n/(Denom*n)
    pstack              % should always print 1/Denom as result
    pop pop pop pop pop
  } for
} def

Test

-----------------------------------------------------------------

Martin Liversage <operator at iris.kth.dk>
Royal Dental College Copenhagen
Department of Pediatric Dentistry
Norre Alle 20
DK-2200 Kobenhavn N



More information about the Comp.sys.sgi mailing list