Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>the progname() function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The PROGNAME() Function

   Message Reader makes use of one assembly language function named
   PROGNAME().  PROGNAME() retrieves the name of the currently executing
   program (MR.EXE) as a fully qualified filename.  For instance, if the
   Message Reader program is started with the command C:\DEMO\MR, then
   PROGNAME() will return C:\DEMO\MR.EXE.  In the C language this is
   known as argv[0].  Clipper does not have a (documented) built in
   function to retrieve this value.

   The program name returned by PROGNAME() is stripped to a path
   specification with the RLIB function PARENT(), to extract the
   directory in which the MR.EXE file is located.  This path is then used
   to build the help file name for MR.HLP so Message Reader can find its
   own help file.  This assumes the help file is stored in the same
   directory as the MR.EXE executable file.

   PROGNAME() works only with DOS versions 3.0 and above.  In the event
   you are using DOS version 2.x, Message Reader lets you explicitly
   specify the directory in which the help file can be found.  The
   PROGNAME() function (PROGNAME.OBJ) is compatible with both Clipper
   Summer '87 and Clipper 5.0 (and 5.01).

   The assembly language source code for PROGNAME() is in the file
   PROGNAME.ASM and the already assembled linkable object module is in
   PROGNAME.OBJ (in case you do not have an assembler program).  You may
   wish to add the PROGNAME.OBJ module to RLIB.LIB or even to EXTEND.LIB
   for convenience.  You will need a library manager such as Microsoft's
   LIB or Borland's TLIB.  See your library manager documentation for the
   proper syntax.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson