|
Subject: RE: Using "DEFINE" From: "Pawson, David" <DPawson@xxxxxxxxxxx> Date: Fri, 3 Apr 1998 12:19:50 +0100 |
> Chuck Darney [SMTP:cdarney@xxxxxxxxxxxxxxxx] wrote
>
> I would like to add attributes to my top-most element (in this case,
> "cgideliv") to be used to set some variable options in the DSL. I
> want
> to try something like:
>
> (element cgideliv
> (let (deliv (inherited-attribute-string "type))
> (case deliv
> (("generic")
> (define %page-numbering% #f)
> (define %page-header% #t)
> (define %use-footer% #t))
> (("summary"
> (define %page-numbering% #f)
> (define %page-header% #f)
> (define %use-footer% #f))
> (("cert"
> (define %page-numbering% #t)
> (define %page-header% #t)
> (define %use-footer% #t))))
>
> I would then use the defined names later in the DSL to use or not use
> the particular option.
>
Methinks you are hitting the 'no side effects' barrier.
I.e. cannot define in the top level (where all the std defines are)
the page-headers etc.
could you put the (let (deliv (... ) case deliv
inside each of the appropriate characteristics for page-header?
e.g.
(define %page-numering% (let
((deliv (inherited-attribute-string "type"))
(case deliv
(("generic" "summary")) #f)
(else #t))))
Then do the same for the other defines?
Untested, seems sound.
regards, DaveP
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Using "DEFINE", Chuck Darney | Thread | Problem With tree-before, W. Eliot Kimber |
| Re: Problem With tree-before, Richard Light | Date | Re: Production notes (Tables and Do, David Megginson |
| Month |