Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1618

Re: Unbalanced [

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Helge Blischke <h.blischke@acm.org>
Newsgroups comp.lang.postscript
Subject Re: Unbalanced [
Followup-To comp.lang.postscript
Date Wed, 11 Sep 2013 18:34:07 +0200
Lines 38
Message-ID <b9bkc0F7evuU1@mid.individual.net> (permalink)
References <86272e7d-88ce-4adb-ba92-3424ec5e89ca@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 7Bit
X-Trace individual.net zoaHV4Xs1Uohj507HNfHnQgoVJB+rIFU+gPHtWRwPNG6E58dwd
Cancel-Lock sha1:gXyK3RVHWJVAPk+3gxaUW97giIY=
User-Agent KNode/0.99.01
Xref csiph.com comp.lang.postscript:1618

Followups directed to: comp.lang.postscript

Show key headers only | View raw


anavi8r@gmail.com wrote:

> Hi everyone,
> 
> I am writing a PostScript interpreter for a product I sell, and while
> working with some sample .EPS files, I ran into the following:
> 
> /xpdfm
> {
> {
> dup 0 get/Label eq
> {
> aload length[exch 1 add 1 roll/PAGELABEL
> }{
> aload pop
> [{ThisPage}<<5 -2 roll>>/PUT
> }ifelse
> pdfmark_5
> }forall
> 
> 
> This code snippet contains two unbalanced opening square brackets ([).
> 
> Is this normal? How should this be treated by a PostScript interpreter?
> 
> Thanks in advance.
> 
> -- Peter

The "[" is a synonym for the "mark" operator. Its purpose is
to process the following objects on the operand stack back
up to the mark (and removing the mark object) without the necessity
to know how many objects to process.
See e.g. the cleartomark operator from the PLRM as a simple
example, or the array operator.

Helge

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Unbalanced [ anavi8r@gmail.com - 2013-09-11 09:16 -0700
  Re: Unbalanced [ Mark Carroll <mtbc@bcs.org> - 2013-09-11 17:28 +0100
  Re: Unbalanced [ Helge Blischke <h.blischke@acm.org> - 2013-09-11 18:34 +0200
  Re: Unbalanced [ luser- -droog <mijoryx@yahoo.com> - 2013-09-11 12:16 -0700
    Re: Unbalanced [ Helge Blischke <h.blischke@acm.org> - 2013-09-12 11:31 +0200
      Re: Unbalanced [ anavi8r@gmail.com - 2013-09-18 10:11 -0700

csiph-web