On Thu, 27 Apr 2000, Nic Ferrier wrote:
> >>> Venkatesh <[EMAIL PROTECTED]> 27-Apr-00 9:05:06 PM >>>
[ ... ]
> >Is there any way to implement conditional compilation in Java as we
> >do in C++
>
> No, it would be nice on the one hand... but on the other it does
> make things more complicated and more likely to bomb.
[ ... ]
Maybe I'm misunderstanding what you guys mean by "conditional
compilation", but isn't it true that java compilers will ignore blocks
of code that are unreachable? For example, if you have:
if (false) {
...
}
or
if (FOO) {
...
}
where FOO is a final boolean (or perhaps a static final boolean), and
has the value false, the blocks of code within the if's will never be
executed.
Hmmm, looking at my Java in a Nutshell (Second Edition), it says:
While Java does not define explicit constructs for conditional
compilation, a good Java compiler (such as Sun's javac) performs
conditional compilation implicitly ...
And, apologies for responding to this off-topic question.
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html