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


Groups > comp.lang.postscript > #2473 > unrolled thread

Do you ever use the obscure PostScript command '...'?

Started byjdaw1 <jdawiseman@gmail.com>
First post2016-03-27 12:04 -0700
Last post2016-12-20 17:01 +0000
Articles 3 on this page of 23 — 7 participants

Back to article view | Back to comp.lang.postscript


Contents

  Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-03-27 12:04 -0700
    Re: Do you ever use the obscure PostScript command '...'? Markus Triska <triska@metalevel.at> - 2016-03-27 22:57 +0200
      Re: Do you ever use the obscure PostScript command '...'? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-01 18:37 -0700
        Re: Do you ever use the obscure PostScript command '...'? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-01 18:44 -0700
    Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-03-27 14:02 -0700
      Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-03-28 06:32 -0700
        Re: Do you ever use the obscure PostScript command '...'? Markus Triska <triska@metalevel.at> - 2016-03-28 16:53 +0200
        Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-03-28 13:07 -0700
    Re: Do you ever use the obscure PostScript command '...'? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2016-03-28 18:55 -0600
    Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-04-02 16:22 -0700
      Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-04-02 22:03 -0700
    Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-04-13 06:09 -0700
      Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-04-14 10:02 -0700
        Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-04-14 20:24 -0700
          Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-04-14 20:28 -0700
          Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-04-15 15:49 -0700
            Re: Do you ever use the obscure PostScript command '...'? luser- -droog <mijoryx@yahoo.com> - 2016-04-15 23:30 -0700
              Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-04-16 04:49 -0700
    Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-12-03 16:27 -0800
      Re: Do you ever use the obscure PostScript command '...'? jdaw1 <jdawiseman@gmail.com> - 2016-12-03 16:49 -0800
        Re: Do you ever use the obscure PostScript command '...'? luser droog <luser.droog@gmail.com> - 2016-12-04 13:42 -0800
      Re: Do you ever use the obscure PostScript command '...'? luser droog <luser.droog@gmail.com> - 2016-12-08 20:37 -0800
      Re: Do you ever use the obscure PostScript command '...'? Mark Carroll <mtbc@bcs.org> - 2016-12-20 17:01 +0000

Page 2 of 2 — ← Prev page 1 [2]


#2961

Fromluser droog <luser.droog@gmail.com>
Date2016-12-04 13:42 -0800
Message-ID<d3976d4e-710f-4634-b07a-7be11e31822d@googlegroups.com>
In reply to#2960
On Saturday, December 3, 2016 at 6:49:02 PM UTC-6, jdaw1 wrote:
> Do you ever use the obscure PostScript command ‘cvlit’, except after ‘type’?

I use `cvlit` quite a bit, almost as often as `cvx`, but I think I've /never/
used it after `type`. I think I didn't even realise that the result of `type`
is an executable name was in reading the commentary in Braswell's /Inside 
Postscript/ when he breaks down the `==` procedure.

For `type` I use it when trying to check types of arguments in a procedure[1]

% (string)  func  -
/func {
    dup type /stringtype ne{
        /func cvx /typecheck signalerror
    if

    pop
} def

For `cvlit`, I've used it sometimes to provide a different "view" 
of part of an executable array. Mostly when doing things like 
scanning through a nested array structure recursively. But also
with writing looping procedures that behave more like looping 
operators.

Like if you wanted a variable to hold the two values of currentpoint
together and be easily updatable and easy to put the values back on
the stack.

%saved point
/cp [ 10 10 ] cvx def
/cparray /cp load cvlit def

% x y  save-point  -
/save-point{
  cparray astore
} def

(above code is "pessimized" to show usage of both cvlit and cvx,
but practically you can use just one or the other usually, by
constructing the object with the desired attribute to begin with,
ie. [ ... ] cvx  -->  { ... }, with the complication that there
can be a significant difference in the meaning of '...' here.)

[1] note `signalerror` is ghostscript's (better) name for Adobe's undocumented
`.error` procedure.

[toc] | [prev] | [next] | [standalone]


#2965

Fromluser droog <luser.droog@gmail.com>
Date2016-12-08 20:37 -0800
Message-ID<d132356d-56a4-4527-80fa-13eba3f263da@googlegroups.com>
In reply to#2959
On Saturday, December 3, 2016 at 6:27:50 PM UTC-6, jdaw1 wrote:
> Do you ever use the obscure PostScript command ‘packedarray’?
> Do you ever use the obscure PostScript command ‘executeonly’?
> Do you ever use the obscure PostScript command ‘noaccess’?

Never used any of these. For xpost, packedarray just
makes a readonly array, which if you remember my earlier
thread, means execute too.

https://groups.google.com/d/topic/comp.lang.postscript/ENxhFBqwgq4/discussion

[toc] | [prev] | [next] | [standalone]


#2975

FromMark Carroll <mtbc@bcs.org>
Date2016-12-20 17:01 +0000
Message-ID<8760mer0vj.fsf@ixod.org>
In reply to#2959
On 03 Dec 2016, jdaw1 wrote:

> Do you ever use the obscure PostScript command ‘packedarray’?
> Do you ever use the obscure PostScript command ‘executeonly’?
> Do you ever use the obscure PostScript command ‘noaccess’?

No to those, nor `cvlit', that I can see among my own code!

-- Mark

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.postscript


csiph-web