[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Trace facility

From: Alex Shinn
Subject: Re: [Chicken-users] Trace facility
Date: Thu, 06 Jan 2005 12:17:57 -0600
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Thu, 6 Jan 2005 09:14:56 +0000, Joel Reymont wrote:
> > Alex Shinn wrote:
> >If using low-level macros then this can also be done with environment
> >variables instead of features.
> Thanks! This is exactly what I needed. What do you mean by low-level
> macros and variables, though?

(define-macro (debug . args)
  (if (and-let* ((dbg (getenv "CHICKEN_DEBUG")))
        (not (string=? dbg "")))
    `(fprintf (current-error-port) ,@args)

This can't be done with syntax-rules, though it could with

It's a bit of a hack though, the cond-expand solution is cleaner.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]