Difference between revisions of "Talk:Command line parameters and environment variables"

From Lazarus wiki
Jump to navigationJump to search
Line 4: Line 4:
 
:: On *nix paramstr(0) is alos not <i>guaranteed</i> to deliver the excutable filename, though ATM it seems to work on all known systems.
 
:: On *nix paramstr(0) is alos not <i>guaranteed</i> to deliver the excutable filename, though ATM it seems to work on all known systems.
 
:: In practice I haven't experience problems with it. IIRC there was a discussion on the ML about it, but that's long time ago. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:56, 18 June 2020 (CEST)
 
:: In practice I haven't experience problems with it. IIRC there was a discussion on the ML about it, but that's long time ago. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 12:56, 18 June 2020 (CEST)
 +
::: I believe the post on the mailing list is this one by Jonas: https://lists.freepascal.org/pipermail/fpc-pascal/2009-February/020211.html [[User:Trev|Trev]] ([[User talk:Trev|talk]]) 14:13, 18 June 2020 (CEST)

Revision as of 14:13, 18 June 2020

paramStr(0)

@Kai: paramstr(0) isn't guaranteed to return the name of the program on all platforms. IIRC then only DOS/Windows (maybe OS2) guarantees it. --Bart (talk) 22:29, 17 June 2020 (CEST)

It isn’t? I tried to read the RTL’s documentation as carefully as possible. I couldn’t and can’t infer any other constraints than what I’ve already mentioned. I’ve scoured the forum now too, but I couldn’t find statements definitely corroborating your claim: It is available on all platforms, but not if the executable resides on a remote FS. There is definitely a warning though. I’ve added a note. Kai Burghardt (talk) 00:39, 18 June 2020 (CEST)
On *nix paramstr(0) is alos not guaranteed to deliver the excutable filename, though ATM it seems to work on all known systems.
In practice I haven't experience problems with it. IIRC there was a discussion on the ML about it, but that's long time ago. --Bart (talk) 12:56, 18 June 2020 (CEST)
I believe the post on the mailing list is this one by Jonas: https://lists.freepascal.org/pipermail/fpc-pascal/2009-February/020211.html Trev (talk) 14:13, 18 June 2020 (CEST)