Re: Yet another newbie question

Subject: Re: Yet another newbie question
From: Louis-Dominique Dubeau <ldd@xxxxxxxxxxx>
Date: 27 Aug 1998 08:37:11 -0400
Tony Graham <tgraham@xxxxxxxxxxxxxxxx> writes:

> At 26 Aug 1998 15:38 -0500, CORL, Ernie wrote:
>  > I have the following entry in my dsssl spec:
>  > 	(element sysobj 
>  > 		(make element
>  > 			gi: "newsysobj"
>  > 			attributes: '(("newtype" (attribute-string "type")))
>  > ))
>  > 
>  > But I receive the following error message from Jade:
>  > 	"...invalid value for "attributes" characteristic".
> 
> Your quoting with "'" is being a bit too successful.  Try:
> 
> 	(element sysobj 
> 		(make element
> 			gi: "newsysobj"
> 			attributes: (list
> 				     (list
> 				       "newtype" (attribute-string "type")))
> 
> although the second `list' is possibly unnecessary, in which case
> parentheses could be used.

You can get the same effect by doing this:

	(element sysobj 
 		(make element
 			gi: "newsysobj"
 			attributes: `(("newtype" ,(attribute-string "type")))))
 
Only the last line has changed.  It uses backquote instead of quote
and (attribute-string...) is preceeded by a comma.  (Beware: in some fonts,
quotes and backquotes have the same appearance.)  Basically the
backquote says, quote the following but evaluate whatever element is
preceeded by a comma.  I use that all the time instead of using
(list...)  because it allows for terser code (whether this is actually
a good thing or not is probably debatable).

	Regards,
	ldd


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Yet another newbie question
    • CORL, Ernie - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA14026Wed, 26 Aug 1998 17:20:14 -0400 (EDT)
      • Tony Graham - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id RAA15300Wed, 26 Aug 1998 17:43:53 -0400 (EDT)
        • G. Ken Holman - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id VAA06324Wed, 26 Aug 1998 21:29:25 -0400 (EDT)
        • Louis-Dominique Dubeau - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id IAA26127Thu, 27 Aug 1998 08:40:24 -0400 (EDT) <=