Quote
"Tom Fosdick" <tom.fosd...@apdcomms.FISH.co.uk> wrote in message
news:anqniuol5c3reoqhe1hbl21ogt89jj67vo@4ax.com...
Quote
> Before switching to Delphi I used to develop C on Unix platforms.
> static char const rcsid[]= "$RCSfile$";
> ATM the best wasy I can come up with is to add the following to the
> end of each source file .
> var
> rcsid:string;
> initialization
> rcsid:='$RCSfile$";
delphi doesn't have much macro and inline support like $FILE$
given everything else it seems like a deliberate omission,
I can see the reasoning, a compiler is not an interpreter.
you get the same effect with
unit Unit1;
interface
implementation
var rcsid:string='$rcsfile$';
or
{$I RCSINFO.VCS} containing <= const rcsid='$RCSFILE$';
or
unit Unit1;
{$DESCRIPTION '$RCSFILE$'} ... sourced from last compiled unit per
exe/dll
unit1
var rcsid:string='G:\DelphiCode\version info\Unit1.pas 10-07-02 8:59:14 PM';
unit2
var rcsid:string='G:\DelphiCode\version info\Unit2.pas 10-07-02 8:59:15 PM';
aren't optimised out of the exe
Quote
> This, of course, incurrs cpu cycles every time the app is started, but
> doesn't get optimized out. There has to be a better way...
a single string assign ,a few hundred or thousand cycles, ie a few
microseconds
meanwhile all those windows,system,printers,clipboards etc are doing
their own init sections, registering with windows, talking to COM,
finding out their place within windows
a unit without a coded init does an 'enter blank init, leave blank init'
call
you may as well do something there ;-)