[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro like "my" in Perl
From: |
Robert Uhl <address@hidden> |
Subject: |
Re: macro like "my" in Perl |
Date: |
25 Jun 2002 17:16:50 -0600 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
address@hidden (Paul Jarc) writes:
>
> I'm looking for something like Perl's "my": something that adds a
> binding to the current environment (like internal defines), gives an
> error for multiple uses of the same symbol in a single scope (like
> internal defines and let), and lets previously-defined variables be
> used in values for later bindings (like let*). I expect I'll have to
> wrap the whole scope with a special macro, but I'd like to avoid
> having each definition wrap everything that comes after it. Is there
> anything like this already out there?
Sounds like yet another job for bound?. Essentially, one could simply
write a little macro which checks if something is bound, erroring if
so, otherwise defining it and then doing something else.
--
Robert Uhl <address@hidden>
The power of Satan is as nothing before the might of the Lord, so don't
go getting any ideas. --I Abyssinians 20:20