[fpc-devel] CmdLine

Michael Van Canneyt michael at freepascal.org
Wed Oct 18 21:25:30 CEST 2006



On Wed, 18 Oct 2006, Peter Vreman wrote:

> >> Does the CmdLine variable in the System unit exist for Delphi/TP/...
> >> compatibility ?
> >
> > Delphi compatibility.
> >
> > By the way, I have a patch ready which turns it into a property, which
> > prevents some code being pulled in Hello World kind of apps.
> 
> That is the best solution. It will then also be readonly.

Do you get rid of the duplicate argc/argv and cmdline, then ?

Code like

{$if defined(MSWINDOWS) or defined(OS2)}
  { finally release the heap if possible, especially
    important for DLLs }
  for i:=0 to argc do
    sysfreemem(argv[i]);
  sysfreemem(argv);
{$endif}
{$if defined(LINUX) or defined(BSD)}
  sysfreemem(cmdline);
{$endif}

seems rather strange to me...

Michael.



More information about the fpc-devel mailing list