Hi,

Below is a quote from the documentation of the ApplicationName() function:

"Standard this is equal to the result of ParamStr(0), but it can be
customized by setting the OnGetApplicationName callback."


This seems incorrect, as the following test program shows.


------------------[ test1.pas ]--------------------------
program test1;

{$mode objfpc}{$H+}
uses
  Classes, Sysutils;

begin
  writeln('ParamStr(0):      <' + ParamStr(0) + '>');
  writeln('ApplicationName:  <' + ApplicationName + '>');
end.
---------------------------------------------------------

Here is the console output of above program:

  $ mv test1 test1.elf64
  $ ./test1.elf64
  ParamStr(0):      </tmp/test1>
  ApplicationName:  <test1>




ApplicationName() only returns the filename portion (without paths or
extensions) of ParamStr(0).


Am I miss interpreting the documentation, are is this an actual mistake
in the docs. If the latter, then I'll create a documentation patch for
ApplicationName().



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to