Path: 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: Reply-To: tynor@pyr.UUCP (Steve Tynor) Organization: Georgia Tech Research Institute Lines: 24 >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