Path: csiph.com!usenet.pasdenom.info!goblin1!goblin.stu.neva.ru!feed.xsnews.nl!border-1.ams.xsnews.nl!feeder.xennanews.com!feeder3!nf39.xennanews.com!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.postscript Subject: Keeping values of a temporary dictionary Organization: Decebal Computing X-Homepage: http://www.decebal.nl/ Date: Wed, 26 Dec 2012 14:52:59 +0100 Message-ID: <87han8c43o.fsf@Compaq.site.inet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:S0ah953HhfINyVx5511RWrmVc5k= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@xennanews.com Lines: 45 NNTP-Posting-Host: 84.53.123.169 (84.53.123.169) NNTP-Posting-Date: Wed, 26 Dec 2012 14:59:05 +0100 Xref: csiph.com comp.lang.postscript:1192 I am trying to set colours to use depending on an input varable. I have the following code: currentdict /setColours 5 dict def %setColours begin /previousDict exch def /LG_BL_YE { /gradient1 { colorLimeGreen } def /gradient2 { colorBlue } def /textColor { colorYellow } def } def /FG_MFG_YE { /gradient1 { colorForestGreen } def /gradient2 { colorMediumForestGreen } def /textColor { colorYellow } def } def /FG_MFG_WH { /gradient1 { colorForestGreen } def /gradient2 { colorMediumForestGreen } def /textColor { colorWhite } def } def /FG_MFG_DG { /gradient1 { colorForestGreen } def /gradient2 { colorMediumForestGreen } def /textColor { colorDarkGreen } def } def COLOUR_SCHEME where { COLOUR_SCHEME get exec }{ % ### message no COLOUR_SCHEME /gradient1 { colorNavy } def /gradient2 { colorNavy } def /textColor { colorYellow } def } ifelse %previousDict /gradient1 { gradient1 } put %end I would like to use the temporary dictionary setColours to set the gradient and text colours. But when I remove the comments, the script hangs. What is the correct way to do it? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof