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


Groups > comp.lang.postscript > #1192

Keeping values of a temporary dictionary

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Keeping values of a temporary dictionary
Organization Decebal Computing
Date 2012-12-26 14:52 +0100
Message-ID <87han8c43o.fsf@Compaq.site.inet> (permalink)

Show all headers | View raw


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

Back to comp.lang.postscript | Previous | Next — 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