Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!pacbell!sactoh0!bkbarret From: bkbarret@sactoh0.UUCP (Brent K. Barrett) Newsgroups: comp.lang.c Subject: Re: Args to C progs?? Summary: Turbo C == ANSI C Keywords: Turbo C Message-ID: <722@sactoh0.UUCP> Date: 6 Mar 89 21:32:25 GMT References: <9600003@silver> <993@jhunix.HCF.JHU.EDU> Organization: Sacramento Public Access, Ca. USA Lines: 33 In article <993@jhunix.HCF.JHU.EDU>, c08_d103@jhunix.HCF.JHU.EDU (Ex-God) writes: > In article <9600003@silver> mitchemt@silver.bacs.indiana.edu writes: > > > > I am writing a program in Turbo C and would like to know how to pass > >arguments to it from the command line after it is compiled to a .exe file. [Stuff removed] > Well, I don't know Turbo C, but if it's reasonably standard, it > should pass an integer and an array of strings. Try > > main (argc, argv) > int argc; > char *argv[] > > For more information, check K&R1 5.11 (p110-114) or K&R2 5.10 > (p114-118). If someone knows Turbo C better than I do, tell me if > that will work.... Well, I know Turbo C pretty well. Yes, it's a fairly good ANSI C, so what you stated will work and is true for Turbo C. To the previous poster, though, why didn't you consult your reference manual? It's clearly stated how to access parameters passed on the command line via the argc/argv combo. [ignore] -- "Somebody help me! I'm trapped in this computer!" Brent Barrett ..pacbell!sactoh0!bkbarret GEMAIL: B.K.BARRETT