2011/3/16 Roland Schäfer :
> Hi,
>
> INCLUDEs like these will insert the appropriate strings into your code:
>
> {$INCLUDE %DATE%}
> {$INCLUDE %TIME%}
> {$INCLUDE %FPCTARGETCPU%}
> {$INCLUDE %FPCTARGETOS%}
> {$INCLUDE %FPCVERSION%}
>
> There are more... AFAIK it's documented in the Programmer's Man
Hi,
INCLUDEs like these will insert the appropriate strings into your code:
{$INCLUDE %DATE%}
{$INCLUDE %TIME%}
{$INCLUDE %FPCTARGETCPU%}
{$INCLUDE %FPCTARGETOS%}
{$INCLUDE %FPCVERSION%}
There are more... AFAIK it's documented in the Programmer's Manual.
Cheers
Roland
On 3/16/2011 2:18 PM, Mar
Hi,
Some day I saw an example using "macros" on the code.
I want to put the compiler version in an "about form"... I remember
something like %fpcversion%... %date%...whatever.
Marcos Douglas
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
htt
Hi again,
I've forgotten to give a pointer:
{$define BYTE_ORDER(oc):=((oc)=OCODE_GNOP1 or (oc)=OCODE_GESD)}
<--->
Marc
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Am Mittwoch, den 20.09.2006, 00:55 +0200 schrieb Michalis Kamburelis:
> Marc Santhoff wrote:
> > Hi,
> >
> > the docs only show examples of macros without any parameters. Is it
> > possible to use them?
> >
> > Can I make this work anyhow:
> >
> > {$MACRO ON}
> > {$define HOFFSET(rec,field) := p
Hi,
how is the correct syntax for macros having more than one parameter?
{$define HOFFSET(rec,field):=(pointer(@(rec).(field)) - pointer(@(rec)))}
This does not work, even if there is a semicolon between the two
parameter names.
Trying to use it like this:
i := HOFFSET(s1, a); { Line 42 }
Marc Santhoff wrote:
> Hi,
>
> the docs only show examples of macros without any parameters. Is it
> possible to use them?
>
> Can I make this work anyhow:
>
> {$MACRO ON}
> {$define HOFFSET(rec,field) := pointer(@rec.field) - pointer(@rec)}
>
> type
> s1_t = record
> a: lon
Hi,
the docs only show examples of macros without any parameters. Is it
possible to use them?
Can I make this work anyhow:
{$MACRO ON}
{$define HOFFSET(rec,field) := pointer(@rec.field) - pointer(@rec)}
type
s1_t = record
a: longint;
b: single;
Hello!
> Hi,
>
> I was wondering if I could do something like this with a macro in FPC:
>
> const HASH_TABLE_MASK = $ff;
> function GetHashIndex ( hash :dword) :integer;
> begin
>result := hash AND HASH_TABLE_MASK;
> end;
>
> it's kind of a helper funcion so I don't want to perform the functio
Hi,
I was wondering if I could do something like this with a macro in FPC:
const HASH_TABLE_MASK = $ff;
function GetHashIndex ( hash :dword) :integer;
begin
result := hash AND HASH_TABLE_MASK;
end;
it's kind of a helper funcion so I don't want to perform the function call
in the
code.
Would t
10 matches
Mail list logo