🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8782

Re: condition compile in Java?

#8782
From: Ronald Wildenberg
Date: Mon, 26 Feb 2001 13:17
51 lines
2673 bytes
--------------FBFA8FB51EDAFA330DC7AC74
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Some additional info.

The statements beginning with //@ (e.g. "//@ DEBUG(...);") need
to be filtered first by removing the //@ part (leaving e.g. "DEBUG(...);").
Then cpp can be called:

cpp -include defFile -C sourceFile.java | \
    grep -v '^\#' | \
    tail +10 > destFile.java

The file defFile contains entries like
#define DEBUG(_x_)    Debug.log (__FILE__ + "[" + __LINE__ + "] " + (_x_))

The file defFile can be extended at will with debug statements
(e.g. TRACE, DEBUG, EXCEPTION, ...) that can be used in
the source file.

I hope this explanation has not become to complicated to use.

Ronald.


--------------FBFA8FB51EDAFA330DC7AC74
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Some additional info.
<p>The statements beginning with //@ (e.g. "//@ DEBUG(...);") need
<br>to be filtered first by removing the //@ part (leaving e.g. "DEBUG(...);").
<br>Then cpp can be called:
<p><tt>cpp -include defFile -C sourceFile.java | \</tt>
<br><tt>&nbsp;&nbsp;&nbsp; grep -v '^\#' | \</tt>
<br><tt>&nbsp;&nbsp;&nbsp; tail +10 > destFile.java</tt>
<p>The file defFile contains entries like
<br>#define DEBUG(_x_)&nbsp;&nbsp;&nbsp; Debug.log (__FILE__ + "[" + __LINE__
+ "] " + (_x_))
<p>The file defFile can be extended at will with debug statements
<br>(e.g. TRACE, DEBUG, EXCEPTION, ...) that can be used in
<br>the source file.
<p>I hope this explanation has not become to complicated to use.
<p>Ronald.
<br>&nbsp;</html>

--------------FBFA8FB51EDAFA330DC7AC74--
Technical Details
Message-ID: <3A9A575F.802D5088@tryllian.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsfeed01.tsnz.net!bornews.borland.com!dnews!62.58.162.210
References: <3a99c43b_2@dnews> <3A9A446E.904C1710@tryllian.com>

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-26 05:34:06 PST
Message-ID: <3A9A575F.802D5088@tryllian.com>
Date: Mon, 26 Feb 2001 14:17:19 +0100
From: Ronald Wildenberg <ronald@tryllian.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: condition compile in Java?
References: <3a99c43b_2@dnews> <3A9A446E.904C1710@tryllian.com>
Content-Type: multipart/alternative;
 boundary="------------FBFA8FB51EDAFA330DC7AC74"
NNTP-Posting-Host: 62.58.162.210
X-Trace: 26 Feb 2001 05:15:10 -0800, 62.58.162.210
Lines: 52
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsfeed01.tsnz.net!bornews.borland.com!dnews!62.58.162.210