home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / argc.c < prev    next >
C/C++ Source or Header  |  1993-10-14  |  1KB  |  56 lines

  1. /*
  2.  * GT CLIPPER STANDARD HEADER
  3.  *
  4.  * File......: argc.c
  5.  * Author....: Andy M Leighton
  6.  * BBS.......: The Dark Knight Returns
  7.  * Net/Node..: 050/069
  8.  * User Name.: Andy Leighton
  9.  * Date......: $Date$
  10.  * Revision..: $Revision$
  11.  *
  12.  * This is an original work by Andy Leighton and is placed in the
  13.  * public domain.
  14.  *
  15.  * Modification history:
  16.  * ---------------------
  17.  *
  18.  * $Log$
  19.  *
  20.  */
  21.  
  22. /*
  23.  *  $DOC$
  24.  *  $FUNCNAME$
  25.  *      GT_ARGC()
  26.  *  $CATEGORY$
  27.  *      Environment
  28.  *  $ONELINER$
  29.  *      Returns the number of parameters on the command line
  30.  *  $SYNTAX$
  31.  *      GT_argc() --> nCount
  32.  *  $ARGUMENTS$
  33.  *      None
  34.  *  $RETURNS$
  35.  *      nCount  - The number of command line parameters.
  36.  *  $DESCRIPTION$
  37.  *      Get the number of parameters passed to the Exe
  38.  *      Reads the C startup variable to find the number of parameters
  39.  *
  40.  *      Note there is always 1 parameter.  In C argv[0] always equals
  41.  *      the EXE name in non prehistoric DOSes
  42.  *  $EXAMPLES$
  43.  *      ? "I have been passed " + str(GT_Argc()) + " parameters."
  44.  *  $END$
  45.  */
  46.  
  47. #include "extend.h"
  48.  
  49. extern int __argc;
  50.  
  51. CLIPPER
  52. GT_argc()
  53. {
  54.   _retni(__argc);
  55. }
  56.