Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!cmcl2!phri!marob!fredg From: fredg@marob.masa.com (Fred Goldrich) Newsgroups: comp.lang.c Subject: Interactive LPI-C problem Summary: Compiler doesn't find argc? Message-ID: <2707476A.1AAE@marob.masa.com> Date: 1 Oct 90 13:40:57 GMT Organization: ESCC, New York City Lines: 33 I recently obtained my first supposedly ANSI-compatible C complier, LPI-C from Interactive Systems Corp. and Language Processors, Inc. In my first few moments of playing around with it, I think I have found a serious problem -- it seems to come up with the wrong value for argc! $cat test.c main(argc,argv) int argc; char *argv[]; { printf("Hello world! -- %d\n",argc); } $cc test.c $a.out Hello world! -- 1 $a.out xxx Hello world! -- 2 $lpicc test.c $a.out Hello world! -- 0 $a.out xxx Hello world! -- 0 Am I misunderstanding something about ANSI C? (Please, flame gently!) Or is there indeed a problem here? Thanks to all. -- Fred Goldrich {att,philabs,rutgers,cmcl2,hombre}!phri!marob!fredg (formerly dasys1!maestro)