Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!phoenix.cambridge.ac.UK!CET1 From: CET1@phoenix.cambridge.ac.UK (Chris Thompson) Newsgroups: comp.lang.postscript Subject: Re: How long can a PostScript name be? Message-ID: <9FF0514456347C20@UK.AC.CAM.PHX> Date: 28 Feb 89 16:04:07 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 20 Thanks to Glenn Reid for his reply to my query, because it has told me something I didn't know about PostScript: you can apply the "length" operator to a name and get the length of the string necessary to hold the results of cvs'ing it. One couldn't have guessed this from the red book, I think. The "length" operator is documented as working on arrays, dictionaries, and strings. It doesn't explicitly say that those are the only things it works on, but one is probably led to assume that, as "typecheck" is one of the errors documented as possibly occurring. In actual fact, experimentation with a LaserWriter (PostScript version 38.0) suggests that "length" can be applied to absolutely anything, although the results aren't always as interesting as they are for a name. All types except arrays, dictionaries, names and strings seem to give the result 1. Chris Thompson JANET: cet1@uk.ac.cam.phx ARPA: cet1%phx.cam.ac.uk@nss.cs.ucl.ac.uk