Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uunet!mcsun!ukc!cam-cl!news From: cet1@cl.cam.ac.uk (C.E. Thompson) Newsgroups: comp.lang.postscript Subject: Re: load operator Message-ID: <1991Feb28.151933.8786@cl.cam.ac.uk> Date: 28 Feb 91 15:19:33 GMT References: <1991Feb26.010153.5370@kfw.COM> <436@heaven.woodside.ca.us> Reply-To: cet1@cl.cam.ac.uk (C.E. Thompson) Organization: U of Cambridge Comp Lab, UK Lines: 37 In article <436@heaven.woodside.ca.us> glenn@heaven.woodside.ca.us (Glenn Reid) writes: >Dan Mick writes >> >> Should load work on a non-name-type operand? >> >> In other words would you expect this to work: >> >> (Times-Roman) load setfont >> >> , or does it have to be >> >> (Times-Roman) cvn load setfont > >Yes, the "load" operator works with non-name-type operands. So does >the "def" operator, its converse. The following examples are all >perfectly legitimate in PostScript: > >3 (three) def >3 load == returns the string (three) > >(four) 4 def >(four) load == returns the integer 4 > >5 (five) def >3 2 add load == returns the string (five) > Every word you say is true, Glenn, but I think you may be misleading the original poster. Keys in PostScript directories can have any type (although the case of names is usually optimised), but the type is significant when matching the key. Thus the user's two examples may both be valid, but they won't access the same directory entries. If, as one rather suspects, he has added FontDirectory to the directory stack and is hoping to find the canonical Times-Roman font, only the second will have the desired effect. Chris Thompson JANET: cet1@uk.ac.cam.phx Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk