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


Groups > comp.lang.postscript > #1196

Re: Keeping values of a temporary dictionary

Path csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!feed.xsnews.nl!border-3.ams.xsnews.nl!feeder.xennanews.com!nf36.xennanews.com!not-for-mail
From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: Keeping values of a temporary dictionary
Organization Decebal Computing
References <87han8c43o.fsf@Compaq.site.inet> <87zk10afux.fsf@Compaq.site.inet> <87txr8adz0.fsf@Compaq.site.inet>
X-Homepage http://www.decebal.nl/
Date Thu, 27 Dec 2012 17:52:18 +0100
Message-ID <87wqw3igjh.fsf@Compaq.site.inet> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
Cancel-Lock sha1:GdpBDXkhfstnuXfzVp7eM7tPbBU=
MIME-Version 1.0
Content-Type text/plain
X-Complaints-To abuse@xennanews.com
Lines 49
NNTP-Posting-Host 84.53.123.169 (84.53.123.169)
NNTP-Posting-Date Thu, 27 Dec 2012 17:59:06 +0100
Xref csiph.com comp.lang.postscript:1196

Show key headers only | View raw


Op woensdag 26 dec 2012 19:02 CET schreef Cecil Westerhof:

> Op woensdag 26 dec 2012 18:21 CET schreef Cecil Westerhof:
>
>> /gradient1 setColourScheme /gradient1 get def
>> /gradient2 setColourScheme /gradient2 get def
>> /textColor setColourScheme /textColor get def
>>
>> Maybe I should write a function to retrieve the values.
>
> Done:
> /getDictValues { % dictionary nameArray
> {
> dup
> 3 -1 roll
> dup
> 4 1 roll
> exch
> get def
> } forall
> pop
> } def
>
> setColourScheme [/gradient1 /gradient2 /textColor] getDictValues

Because I do not need the dict setColourScheme anymore I changed it
to:
    currentdict setsetColourScheme [/gradient1 /gradient2 /textColor] getDictValues
    (after getDictValues) ==
    pstack
    currentdict setColourScheme undef
    (after undef) ==
    pstack
    setColourScheme /gradient1 get
    (after fetch) ==
    pstack

The == and pstack are to check. I get:
    (after getDictValues)
    (after undef)
    (after fetch)
    {colorForestGreen}

So setColourScheme is not deleted. Why not?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

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


Thread

Keeping values of a temporary dictionary Cecil Westerhof <Cecil@decebal.nl> - 2012-12-26 14:52 +0100
  Re: Keeping values of a temporary dictionary Cecil Westerhof <Cecil@decebal.nl> - 2012-12-26 18:21 +0100
    Re: Keeping values of a temporary dictionary Cecil Westerhof <Cecil@decebal.nl> - 2012-12-26 19:02 +0100
      Re: Keeping values of a temporary dictionary Cecil Westerhof <Cecil@decebal.nl> - 2012-12-27 17:52 +0100
        Re: Keeping values of a temporary dictionary sjprouty3765@gmail.com - 2012-12-28 12:31 -0800
          Re: Keeping values of a temporary dictionary Cecil Westerhof <Cecil@decebal.nl> - 2012-12-28 22:54 +0100
    Re: Keeping values of a temporary dictionary luser- -droog <mijoryx@yahoo.com> - 2012-12-26 15:34 -0800

csiph-web