[fpc-pascal] InstantFPC and argv

Mattias Gaertner nc-gaertnma at netcologne.de
Fri May 4 22:57:29 CEST 2012

On Fri, 04 May 2012 17:22:16 +0200
dhkblaszyk at zeelandnet.nl 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?

instantfpc passes as first parameter the original file name.
But execv overrides the first argument with the executed file. AFAIK
there is no alternative.

You can set an environment variable.


More information about the fpc-pascal mailing list