guile-user
[Top][All Lists]
Advanced

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

Re: Creating a top level definition if none so far exists, on the fly.


From: rixed
Subject: Re: Creating a top level definition if none so far exists, on the fly.
Date: Thu, 15 Aug 2013 13:10:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> (if (not (defined? 'ToggleFiguredBassMode::Active))
>     (define ToggleFiguredBassMode::Active #f))
> 
> The intention is to have a variable defined at the top level which
> starts out being #f. The need for the construct arose because it
> appears in a self-contained script which cannot expect an
> initialization step to have been performed.
> Is there a straight-forward way to modify this?

(define ToggleFiguredBassMode::Active
  (if (defined? 'ToggleFiguredBassMode::Active)
      ToggleFiguredBassMode::Active
      #f))

Nothing to feer I guess.




reply via email to

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