Note: returned is one less than the actual number stored in Clipper because Clipper's includes argv[0], which is the executing program and its path.

Turbo C compile batch file is:

tcc -zAPROG -zBBSS -zCPROG -zDBSS -ml -c -zRDATA -zTDATA %1

Tlink command line:

tlink /n/x testarg+arg,,,\clipper\clipper;

To test it:

TESTARG one two three

_________________________________________________________________

I wrote this in response to a request on Nanforum for help in retrieving the drive, path, and name of the executing file. The problem with using CURDIR() is that it returns this information about the Current path, which may not be the exe's path. An example of this would be starting a program from another directory.

C:\> C:\EXEDIR\TESTARG one two three

This example starts the program, TESTARG, which resides in C:\EXEDIR\, from the root directory.

Although it's sometimes fun to experiment or hack, wouldn't it be so much better if Nantucket would sell (profit for them), or give out documentation on the library? I can think of many, many useful functions to write, if we could only interface directly with more internal functions. Couldn't you? Maybe next version.