[fpc-pascal] InstantFPC and argv

dhkblaszyk at zeelandnet.nl dhkblaszyk at zeelandnet.nl
Fri May 4 17:44:01 CEST 2012


On 4 mei '12, michael.vancanneyt at wisa.be wrote: 

> On Fri, 4 May
2012, michael.vancanneyt at wisa.be [3]wrote:
>> On Fri, 4 May 2012,
dhkblaszyk at zeelandnet.nl [1]wrote: 
>>> I'm creating a script to be
executed by instantfpc when I noticed that paramstr(0) does not reflect
the location of the script but the location of the cached executable. Is
there a way to alter this location programatically to the script
location? Is there an alternative way?
>> The solution can be found on
http://www.freepascal.org/docs-html/prog/progsu38.html [2] Const
ScriptName = {$INCLUDE FILE};
> Come to think of it, probably not
100% what you want. 
> It will contain the name of the temporary script
> Michael.
> _______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org [4]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal [5]

it's not. ScriptName will contain "configure.ppx.pas". What I want it
that ParamStr(0) will contain the full filename to the script file
instead of the compiled version. This should be the default behaviour
imho b ecause it's an "executable" script and not a source file anymore.

Regards, Darius 


mailto:dhkblaszyk at zeelandnet.nl
mailto:michael.vancanneyt at wisa.be
mailto:fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120504/e479d572/attachment.html>

More information about the fpc-pascal mailing list