Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms Subject: Re: C on VMS Message-ID: <880125025532.00g@CitHex.Caltech.Edu> Date: 25 Jan 88 11:02:01 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 17 > The problem I have it how do I pass arguments into the program (i.e., > UNIX-style, foo -w). If I give any args on the VMS 'run' command line, the > system complains about too many parameters. In addition, touching argv in > the C program either gives bogus information or causes the program to bomb. There are at least four ways of doing this: 1) Define the program as a foreign command; i.e.: $ foo:==$sys$login:foo Then invoke the program with: $ foo -w 2) Use MCR instead of run; i.e.: $ MCR sys$login:foo -w 3) Use LIB$GET_FOREIGN to read the command line and process it yourself 4) Use the CLI routines to parse the command line -------