On 22 Feb 2003 at 22:17, CBFalconer wrote:
There is no provision in any of the standard Pascals for accessing command line data. The Borland clones provide an analog of the C/Unix world in Paramstr and Paramct.
In PascalP I handled this with a system file, called cmdline, much like input and output. It was defined at the encompassing level 0 as a read-only text file, and held a single line. To access it one could use:
reset(cmdline);
[...] "cmdline" already exists in the system unit (BP compatibility) - this is from the BP help file:
"CmdLine (variable) (System unit) In a program, CmdLine contains a pointer to a null-terminated string that contains the command-line arguments specified when the application was started. "
I think having two "cmdline"s is likely to cause confusion - but I guess that if one doesn't use the GPC system unit then there should be no problem in having another cmdline somewhere else.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/