Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - splitcommand() split a full dos command to its components http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 splitcommand()      Split a full DOS command to its components
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   proc splitcommand extern
   param const char    cPath, ;
               char(2) cDrive, ;
               char    cDirectory, ;
               char(8) cFileName, ;
               char(4) cFileExt, ;
               char    cOptions

 Arguments
   cPath is the DOS command string to split.

   cDrive is the drive letter (":" character appended).

   cDirectory is the directory string (prepended and followed by a
      "\" character).

   cFileName is the file name without extension.

   cFileExt is the file name extension (prepended by a dot).

   cOptions is the option string passed to the command.

 Return
   None.

 Description
   The splitcommand() function separates the components of a fully
   qualified command, suitable to invoke a program when executed from
   the DOS command line.

   See the Arguments section above and the example for correct use of
   parameters.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_splitcommand
   vardef
      char cPath, cDrive, cDirectory, cFileName, cFileExt, cOptions
   enddef
   makepath( cPath, "c", "\force\bin", "force", "exe" )
   ? cPath
   splitpath( cPath, cDrive, cDirectory, cFileName, cFileExt )
   ? cDrive, cDirectory, cFileName, cFileExt
   splitcommand( cPath + " test.prg", cDrive, cDirectory, ;
      cFileName, cFileExt, cOptions )
   ? cDrive, cDirectory, cFileName, cFileExt, cOptions
   endproc

   proc main
   Test_splitcommand()
   endproc

See Also: makepath() splitpath()

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