🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7997

How long can a PostScript name be?

#7997
From: CET1
Date: Thu, 16 Feb 1989 22:50
28 lines
1863 bytes
Sometimes, when converting a name to a string with "cvs", one needs
to know how long the result might be (to avoid a "rangecheck"). This
happens in particular when handling the `object being executed' after
an error ("command" in "$error"). (I am assuming that if one prepares
a string big enough to receive the longest possible name, then one is
not going to have any trouble with mere integers, reals, and booleans!)

The red book tells me in Appendix B that the longest allowed name on
a LaserWriter is 128 bytes, but this is presented merely as being a
feature of a particular implementation: it might be different on other
PostScript printers, or even in later versions of the PostScript
interpreter for the LaserWriter.

The way that Adobe's ehandler.ps deals with this problem is to use
the useful scratch string stored under the name `=string' in systemdict.
This string (also used by the = procedure, hence its name) is 128 bytes
long on the LaserWriter, and this would presumably be changed if the
limit on the length of a name were changed.

However, =string is not documented in the red book (or elsewhere, as
far as I know), so using it may be just as chancy as assuming that the
limit of 128 will stay the same. Is there any way of determining the
upper limit on the length of a name relying only on documented features
of PostScript? If not, what method entails the least risk?

Chris Thompson
JANET: cet1@uk.ac.cam.phx
ARPA:  cet1%phx.cam.ac.uk@nss.cs.ucl.ac.uk
Technical Details
Message-ID: <9FE19B2A625D3620@UK.AC.CAM.PHX>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!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!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!phoenix.cambridge.ac.UK!CET1
From: CET1@phoenix.cambridge.ac.UK
Newsgroups: comp.lang.postscript
Subject: How long can a PostScript name be?
Message-ID: <9FE19B2A625D3620@UK.AC.CAM.PHX>
Date: 16 Feb 89 22:50:32 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 28