  C argv and argc, strings, and descriptors? 
 The Question is:
 
Excuse my ignorance, but I am new to this. With Dec C 5.5, how can I pass
argv to a descriptor?
Thank you.
 
 
 The Answer is:
 
  Please see the OpenVMS Frequently Asked Questions (FAQ) for information
  on string descriptors.  See the attached example for details of one way
  to "convert" from a null-terminated string (ASCIZ) over to a static string
  descriptor (ASCID) string.
 
	--
 
#include &lt;descrip.h&gt;
#include &lt;lib$routines.h&gt;
#include &lt;ssdef.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;stsdef.h&gt;
 
#define TEXTBUFLEN 32
main( int argc, char **argv )
  {
  int RetStat;
  struct dsc$descriptor TextDsc =
    { TEXTBUFLEN, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
  char TextBuf[TEXTBUFLEN];
 
  if ( argc != 2 )
    {
    printf("this is a foreign command; usage: argc text\n");
    return SS$_BADPARAM;
    }
 
  sscanf( argv[1], "%32s", TextBuf );
 
  TextDsc.dsc$w_length = strlen( TextBuf );
  TextDsc.dsc$a_pointer = TextBuf;
 
  RetStat = lib$put_output( &amp;TextDsc );
  if (!$VMS_STATUS_SUCCESS( RetStat ))
    return RetStat;
 
  return RetStat;
  }
 
