On Tue, 27 Jul 2004 21:06:01 -0500, Aaron Ballman
<aaron at realsoftware dot com> wrote:
> > I just try in RB 5.5.3f5, but doesn't work. Witch version of RB 5.x is
> > implemented ?
>
> I believe that was in 5.0.
>
> You can use generic #if to conditionally compile code like this:
>
> Const test = true
>
> #if test
> MsgBox "Test"
> #endif
>
> If you set test to false, you will get no MsgBox.
Actually, that existed at least as far back as 4.5.3 and I really
think it pretty much existed forever. But that's not what the feature
request was requesting. What was requested was a way to test whether a
symbol exists or not. For example, let's say you've declared a method
called Foo() in a module and you want to test whether Foo() exists or
not. That's so you can write code that will work even if the module
containing Foo() might not be included in your project. So if we had a
#ifdef we could conditionally compiler depending on whether or not
that symbol existed.
--
REALbasic database options: http://sqlabs.net
REALbasic news and tips: http://rbgazette.com
Simple weblog publishing: http://kidzlog.com
_______________________________________________
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|