Posted by jpluimers on 2013/03/27
As I wrote before, I’m with the [WayBack] Delphi with haters camp, and this is why:
Using the [WayBack] with statement in Delphi makes your code less future proof.
Originally, the with statement in Pascal was argumented in part of allowing compiler optimisations:
PASCAL User Manual and Report – Kathleen Jensen, Niklaus Wirth – Google Books
The with clause effectively opens the scope containing field identifiers of the specified record variable, so that the field identifiers may occur as variable identifiers. (Thereby providing an opportunity for the compiler to optimize the qualified statement.)
Screenshots of this 1975 book are below the fold.
The Delphi (actually even before that Turbo Pascal compiler) has no measurable difference between with and non-with code.
The debugger however, still does not support with, and there are other drawbacks of which one is below.
The below code example is just one of many. I show it because I recently bumped into doing some long overdue code porting to Delphi XE3.
Since I’ve been bitten by using with a couple of times before, it didn’t take me long to find the cause.
Example code where FIConData is of type NOTIFYICONDATAW that used to compile fine:
with FIconData do
begin
cbSize := SizeOf(FIconData);
Wnd := Self.Handle;
uID := $DEDB;
uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP;
hIcon := Application.Icon.Handle;
uCallbackMessage := WM_CAS400NTIcon;
StrCopy(szTip, PChar(Caption));
end;
Well, as of Compiler Version 20, it doesn’t compile any more. Read the rest of this entry »
Posted in Borland Pascal, Conference Topics, Conferences, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Event, Pascal, Software Development, Turbo Pascal, With statement | 32 Comments »
Posted by jpluimers on 2013/02/20
Right now, documentation on Delphi Conditional Defines is on pages like Conditional compilation (Delphi) – RAD Studio XE2, but it is limited as it is for one specific version of Delphi only.
However, over the course of Delphi versions, compiler platforms and bitness, and not forget Free Pascal and Turbo Pascal/Borland Pascal, the matrix has become huge.
There is no complete documentation on that in one place. Right now include files like Defines.inc, the DSPack.inc, the JCL include directory the JVCL common include directory and the Jedi.inc documentation contain the collective knowledge about this.
Someone should condense that in a table and – more important – keep it up to date.
At least now there is a post collecting some of the links that contain the knowledge (:
Found one that contains these columns
- Product & Version
- VERxxx defines
- __BORLANDC__ value
- RTLVersion
- CompilerVersion
- Package Version
via Compiler/RTL version overview « Muetze1 wich is now available on the wayback machine: http://web.archive.org/web/20131229055045/http://www.muetze1.de/?page_id=547
–jeroen
Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, FreePascal, History, Pascal, Software Development, Turbo Pascal | 14 Comments »
Posted by jpluimers on 2013/01/26
Back in the days I started programming, Micro Cornucopia was a wonderful magazine, so I’m glad that BitSavers scanned a few more issues and put them online today, a week after some great PDF scans: Turbo Assembler/Debugger (1993/1994), Borland C++/Object Windows Library (1993):
They covered a lot of languages (x86 and 68k assembly, C, C++, Turbo Pascal and many more), and very interesting hardware designs.
–jeroen
via: Index of /pdf/microCornucopia.
Posted in Assembly Language, BitSavers.org, C, C++, Delphi, Development, History, Pascal, Software Development, Turbo Assembler, Turbo Pascal, x86 | Tagged: computer, software, technology, wonderful magazine | 2 Comments »
Posted by jpluimers on 2013/01/17
The PDF Archive at bitsavers.org has recently put online these raster image PDF scans from Turbo Assembler/Debugger (1993/1994) and Borland C++/Object Windows Library (1993)
Remnants of the past, usefull for RAD Studio, Delphi and C++ Builder developers wanting to know a bit of history (: Read the rest of this entry »
Posted in Assembly Language, BitSavers.org, Borland C++, C, C++, Delphi, Development, History, Pascal, Software Development, Turbo Assembler, Turbo Pascal, x86 | Tagged: assembler version, borland C++, computer, object windows library, programmers guide, software, technology, turbo assembler | 2 Comments »