Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!adobe!heaven!heaven.woodside.ca.us From: glenn@heaven.woodside.ca.us (Glenn Reid) Newsgroups: comp.sys.next Subject: Re: DPS dictfull error with Win3 PS files Keywords: where known Message-ID: <471@heaven.woodside.ca.us> Date: 7 Apr 91 20:56:25 GMT References: <1542@cgh.UUCP> Sender: glenn@heaven.woodside.ca.us Lines: 28 Paul Homchick writes > In using the postscript driver for the NEC, windows was including the > following PS sequence: > > {statusdict begin 2 setpapertray end }stopped pop > > My correspondent mentioned that "There are better ways to safely > execute a PS operator if it [might] not be present". Now, I'm > curious, does anyone know the correct way of doing this? There are two operators that are designed for this kind of thing. They are "where" and "known". Since "statusdict" may be missing in addition to "setpapertray", you should check for both of them. Here is a reasonable way to execute this kind of code: /statusdict where { %if pop statusdict begin /setpapertray where { pop 2 setpapertray } if end } if -- Glenn Reid RightBrain Software glenn@heaven.woodside.ca.us NeXT/PostScript developers ..{adobe,next}!heaven!glenn 415-851-1785 (fax 851-1470)