🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8053

Re: How long can a PostScript name be?

#8053
From: Chris Thompson
Date: Tue, 28 Feb 1989 16:04
20 lines
1336 bytes
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
Technical Details
Message-ID: <9FF0514456347C20@UK.AC.CAM.PHX>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!phoenix.cambridge.ac.UK!CET1

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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