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

From Lazarus wiki
Jump to navigationJump to search
(reply)
Line 2: Line 2:
 
@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. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 22:29, 17 June 2020 (CEST)
 
@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. --[[User:Bart|Bart]] ([[User talk: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: {{Forum topic|37396|It ''is'' available on ''all'' platforms}}, but {{Forum topic|16316|not if the executable resides on a remote FS}}. There is definitely [[Special:PermanentLink/136871#macOS 2|a warning]] though. [[Special:Diff/137162|I’ve added a note.]]  [[User:Kai Burghardt|Kai Burghardt]] ([[User talk:Kai Burghardt|talk]]) 00:39, 18 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: {{Forum topic|37396|It ''is'' available on ''all'' platforms}}, but {{Forum topic|16316|not if the executable resides on a remote FS}}. There is definitely [[Special:PermanentLink/136871#macOS 2|a warning]] though. [[Special:Diff/137162|I’ve added a note.]]  [[User:Kai Burghardt|Kai Burghardt]] ([[User talk:Kai Burghardt|talk]]) 00:39, 18 June 2020 (CEST)
 +
:: 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)

Revision as of 12:56, 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)