Article View: borland.public.jbuilder.java.language
Article #8804Re: condition compile in Java?
From: Dave Bird
Date: Tue, 27 Feb 2001 19:29
Date: Tue, 27 Feb 2001 19:29
24 lines
1757 bytes
1757 bytes
In article <3a99c43b_2@dnews>, glisten liu <glistenliu@lulusoft.com>
writes
>Hi,everyone:
>I want to produce two version for a program, one is the running version and
>another is the debug version. I can use condition compile directs in c/c++.
>But it seems I can do nothing in Java?
No, conditional compile was one of those features
"too complicated to include".
But you can have a condition on the state of some constant like
static final isDebug = true; which you set in Main
and test in the other classes.
Or you can have a boolean variable which you e.g. read from
interaction with the user, or from the contents of a file.
HTH.
--
^-^-^-@@-^-;-^ http://www.xemu.demon.co.uk/
(..)__u news:alt.smoking.mooses
Technical Details
Message-ID:
<pSH4RgUiAAn6Ewsl@xemu.demon.co.uk>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!194.159.255.21!dispose.news.demon.net!news.demon.co.uk!demon!xemu.demon.co.uk!daveReferences:
<3a99c43b_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,599cae576843a743 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-02-27 16:02:31 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!europa.netcrusader.net!194.159.255.21!dispose.news.demon.net!news.demon.co.uk!demon!xemu.demon.co.uk!dave From: Dave Bird <dave@xemu.demon.co.uk> Newsgroups: borland.public.jbuilder.java.language Subject: Re: condition compile in Java? Date: Tue, 27 Feb 2001 19:29:38 +0000 Organization: none Message-ID: <pSH4RgUiAAn6Ewsl@xemu.demon.co.uk> References: <3a99c43b_2@dnews> NNTP-Posting-Host: xemu.demon.co.uk X-NNTP-Posting-Host: xemu.demon.co.uk:158.152.196.209 X-Trace: news.demon.co.uk 983318418 nnrp-12:7708 NO-IDENT xemu.demon.co.uk:158.152.196.209 X-Complaints-To: abuse@demon.net MIME-Version: 1.0 X-Newsreader: Turnpike Integrated Version 5.00 U <dQumtnY$x4rJ2u5tL5fS$n2vuP> Lines: 24