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

Mailing lists / fpc-pascal / 2019-06
7 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
{$I %FILE%} ?ср, 19 июн. 2019 г. в 17:49, Ryan Joseph :
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
try
writeln({$I %FILE%});it really works ;)
Regards,
Michał
W dniu 2019-06-19 o 16:54, 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
W dniu 2019-06-19 o 17:10, Ryan Joseph pisze:
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ł.
Great,
looking for this "Macro" for 15+ years
Kind Regards
Markus