[lazarus] Win32 Installer/Lazarus

Baeseman, Cliff Cliff.Baeseman at greenheck.com
Tue Jul 20 18:58:06 EDT 1999


I really like that idea...
Cliff

-----Original Message-----
From: Michael A. Hess [mailto:mhess at miraclec.com]
Sent: Tuesday, July 20, 1999 3:23 PM
To: lazarus at miraclec.com
Subject: Re: [lazarus] Win32 Installer/Lazarus


Stefan Hille wrote:
> 
> 1. Let's live with the extra code and put the ifdef's only in the
> debug-class. This would give some extra code, but the cost would only
> be an extra call with a direct return. When thinking of performance
> this approach should be OK.

This is what the TDebug class does already without the need of IFDefs.
The switch that sets debug on or off is just a flag that tells the
TDebug.Write to do a direct return and not do anything. The ifdef
wouldn't buy you anything.

> 2. Use the macro feature of fpc

NOW THIS IDEA I LIKE!

Here is what we could do.

{$define DEBUGOUT:=debug.write}

Then anyplace in the code put code

DEBUGOUT ('whatever trace information you want');

Then when you don't want debug you just need to redefine the macro to be

{$define DEBUGOUT:=//}

The the code becomes

// ('whatever trace information you want');

What does everyone think about this???

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list