Reply-To: "Earl F. Glynn" From: "Earl F. Glynn" Newsgroups: borland.public.delphi.non-technical Subject: D7/K3 Version Number: VER150? What was K2? Date: Wed, 18 Sep 2002 00:07:50 -0500 Lines: 62 Organization: efg's Computer Lab X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 65.69.68.42 Message-ID: <3d880a70$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1032325744 65.69.68.42 (17 Sep 2002 22:09:04 -0700) Path: newsgroups.borland.com!not-for-mail Xref: newsgroups.borland.com borland.public.delphi.non-technical:327265 Today some old version-dependent code wouldn't compile in D7/K3 because the new version wasn't being correctly recognized. Why is finding the necessary version-dependent conditional directive so difficult? I couldn't find anything about this in either the printed or online documentation. Why can't Borland document this, or make this process easier? Lacking documentation, I searched the whole C:\Program Files\Borland\Delphi7 directory for "VER150", which was my guess for D7 since D6/K1 was "VER140". This "VER150" constant did appear in the files DCC32.EXE, DCC70.DLL and coreide.70.bpl -- having to dump files in hex/ASCII to find suspected strings is a poor way to document anything. I found two other curious files that were apparently not part of the D6 release and are new with D7: C:\Program Files\Borland\Delphi7\Source\Indy\IdCompilerDefines.inc and C:\Program Files\Borland\Delphi7\Source\IntraWeb\IWCompilerDefines.inc The first file is 2552 bytes long and the second is 2314 bytes long -- so the "CompilerDefines" files are not quite the same. Why? Here's the section of IdCompilerDefines.inc about D7: //Delphi 7 {$IFDEF VER150} {$DEFINE VCL4ORABOVE} {$DEFINE VCL5ORABOVE} {$IFDEF BCB} {$DEFINE CBUILDER} {$DEFINE CBUILDER7} {$ELSE} {$DEFINE DELPHI} {$DEFINE DELPHI7} {$ENDIF} {$DEFINE OVERLOADING} {$DEFINE OPTIONALPARAMS} {$DEFINE SAMETEXT} {$DEFINE VCL6ORABOVE} {$DEFINE VCL7ORABOVE} {$DEFINE VCL7O} {$DEFINE USEZLIBUNIT} {$ENDIF} Have I missed something? When will Borland directly supply and document such conditional defines and make supporting version-dependent code a bit easier? I'd prefer to write code for my web site that will work in any Delphi/Kylix version (at least back to D3 or D4), but perhaps it's time to forget about old versions and just drop the IFDEFs. What was the version number for K2 since D6/K1 was VER140? -- efg -- Earl F. Glynn, Overland Park, KS USA efg's Computer Lab: http://www.efg2.com/Lab Mirror: http://homepages.borland.com/efg2lab/Default.htm