Article View: comp.lang.modula2
Article #856Re: Why are the loops so awkward?
From: Peter.M..Perchansky Peter M. Per...
Date: Tue, 26 Jun 1990 14:55
Date: Tue, 26 Jun 1990 14:55
42 lines
1779 bytes
1779 bytes
Hello Jim:
In a msg dated 23 Jun 90 08:09:06, Jim Long said:
**********************BEGIN QUOTE*****************************
In an article of <21 Jun 90 15:40:03 GMT>, lins@Apple.COM (Chuck
Lins) writes:
> Compilers are allowed to strip dead code. Constant
boolean
> expressions may never need to be evaluated at run-time
at all.
I haven't tested my Modula-2 system in this regard, but I recall
years ago that UCSD p-System's Pascal compiler treated BOOLEAN
constants in IFs like conditional compilation. If the
constant was FALSE, the compiler would not generate code for
the THEN clause. Does anyone know of any M2 compilers with
this feature?
***********************END QUOTE******************************
Although I don't know of any compilers having this feature, I do know of one that comes close.
TopSpeed Modula-2 2.00 has compiler pragmas for conditional compilation. A very short example follows:
CONST DEBUG = TRUE;
...
BEGIN
...
(*%T DEBUG *)
(* DEBUG STATEMENTS *)
(* FOLLOW HERE *)
...
(*%E *)
...
END;
--
uucp: uunet!m2xenix!puddle!273!101!Peter.M..Perchansky
Internet: Peter.M..Perchansky@f101.n273.z1.fidonet.org
Technical Details
Message-ID:
<682.268913C7@puddle.fidonet.org>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f101.n273.z1.fidonet.org!Peter.M..PerchanskyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f101.n273.z1.fidonet.org!Peter.M..Perchansky From: Peter.M..Perchansky@f101.n273.z1.fidonet.org (Peter M. Perchansky) Newsgroups: comp.lang.modula2 Subject: Re: Why are the loops so awkward? Message-ID: <682.268913C7@puddle.fidonet.org> Date: 26 Jun 90 14:55:14 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 1:273/101 - Schizophrenia, Fleetwood PA Lines: 42