[plt-scheme] Null syntax / Conditional definition

From: Jordan Johnson (jorjohns at cs.indiana.edu)
Date: Sat Jun 18 16:13:28 EDT 2005

On Saturday, June 18, 2005, at 09:39  AM, Eli Barzilay wrote:
>   (define-syntax (OS-dep stx)
>     (syntax-case ()
>       [(_ u w)
>        (case (system-type)
>          [(unix)    #'u]
>          [(windows) #'w])]))
>   (OS-dep (define foo ...)
>           (define foo ...))

Teeny change required in the second line:
|(define-syntax (OS-dep stx)
|    (syntax-case stx ()
|      [(_ u w m)
|       (case (system-type)
|         [(unix)    #'u]
|         [(windows) #'w]
|         [(macosx) #'m])]))

jmj

--
No matter how far down the wrong road you have gone, turn back now.
		-- Anonymous (Turkish proverb)



Posted on the users mailing list.