Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-06

Source file macro

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

Is there a macro for the path of the source file being compiled? I could swear there was something like FPC_SOURCE_FILE but I can’t find it now.

Regards,
Ryan Joseph

Reply by email

Виктор Матузенко
to Ryan Joseph
{$I %FILE%} ?

ср, 19 июн. 2019 г. в 17:49, Ryan Joseph :

Show quoted text 10 lines
Is there a macro for the path of the source file being compiled? I could swear there was something like FPC_SOURCE_FILE but I can’t find it now. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Victor Matuzenko (Виктор Матузенко)

Reply by email

gabor
to Ryan Joseph
try
writeln({$I %FILE%});

it really works ;)

Regards,
Michał

W dniu 2019-06-19 o 16:54, Ryan Joseph pisze:

Show quoted text 21 lines
> On Jun 19, 2019, at 10:52 AM, Виктор Матузенко wrote: > > {$I %FILE%} ? Sorry I mean something like: {$macro on} writeln(FPC_SOURCE_FILE); Looking for a string I can use. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Ryan Joseph
to gabor
Show quoted text 10 lines
On Jun 19, 2019, at 10:59 AM, gabor wrote: try writeln({$I %FILE%}); it really works ;) Regards, Michał

Oh I see now. Strange syntax, never saw that before. Can you get the full path instead of just the name?

Regards,
Ryan Joseph

Reply by email

Markus Greim
to gabor

Great,
looking for this "Macro" for 15+ years

Kind Regards

Markus

Earlier message 36 lines
--- original message --- On June 19, 2019, 5:35 PM GMT+2 wrote: W dniu 2019-06-19 o 17:10, Ryan Joseph pisze: >> >> Oh I see now. Strange syntax, never saw that before. Can you get the full path instead of just the name? >> >> Regards, >> Ryan Joseph >> > Unfortunately, just the name. But it's a good idea to be able to have a > full path. > You can get full listof directives here: > https://www.freepascal.org/docs-html/prog/progsu41.html > Regards, > Michał. > _______________________________________________ > fpc-pascal maillist - > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal --- end of original message ---

Reply by email