Article View: comp.lang.modula2
Article #4567Re: Re: C++ vs. Modula2
From: Steve Tynor
Date: Fri, 13 Jan 1989 15:12
Date: Fri, 13 Jan 1989 15:12
24 lines
1379 bytes
1379 bytes
>conditional compilation. Consider:
> CONST
> OpSys = VMS;
> IF OpSys = VMS THEN
> DoVMSStuff
> ELSE
> DoOtherOSStuff;
>All but the most inanely STUPID of compilers will completely eliminate the
>unreachable code.
But... If in order to DoVMSStuff you have to IMPORT from modules that are
not present in OtherOSs, then in addition to defining the constant, you must
also comment out the IMPORTs... This can get quite messy. I'm currently
having the same problem in a large project in Ada. While most Ada compilers
indeed eliminate code inside conditions that can be proven to be false at
compile time, the compiler still has to scan that code and do syntactic and
semantic checks...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
No problem is so formidable that you can't just walk away from it.
Steve Tynor
Georgia Tech Research Institute
tynor@gitpyr.gatech.edu
Technical Details
Message-ID:
<7051@pyr.gatech.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!uflorida!gatech!gitpyr!tynorReferences:
<INFO-M2%89011219330825@UCF1VM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!uflorida!gatech!gitpyr!tynor From: tynor@pyr.gatech.EDU (Steve Tynor) Newsgroups: comp.lang.modula2 Subject: Re: Re: C++ vs. Modula2 Message-ID: <7051@pyr.gatech.EDU> Date: 13 Jan 89 15:12:01 GMT References: <INFO-M2%89011219330825@UCF1VM> Reply-To: tynor@pyr.UUCP (Steve Tynor) Organization: Georgia Tech Research Institute Lines: 24