HP3000-L Archives

March 1996, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 14 Mar 1996 17:17:00 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Hi Luis,
 
please read a good book about C but I think the following helps
you at the moment:
 
file: test.c
#include <stdio.h>
 
void main (int argc, char* argv[])
{
int i;
 
printf("argc: %d\n",argc);
for(i=0;i<argc;i++)
   printf("argv[%d]: %s\n",i,argv[i]);
}
 
 
 
 
compile and run in Posix Shell:
 
shell/iX> c89 test.c -o blubb
 
shell/iX> blubb aa 123 56 ggg
argc: 5
argv[0]: blubb
argv[1]: aa
argv[2]: 123
argv[3]: 56
argv[4]: ggg
shell/iX>
 
'Hope this helps you anyway...
Holger Wiemann
Hewlett Packard GmbH, Germany

ATOM RSS1 RSS2