www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/04/10:26:37

Date: Sun, 4 Aug 1996 17:20:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
Cc: Giva AT bbb DOT no, djgpp AT delorie DOT com, gv AT nera DOT no
Subject: Re: Compile Errors
In-Reply-To: <199608041243.QAA02617@video.yars.free.net>
Message-Id: <Pine.SUN.3.91.960804171838.10128A-100000@is>
Mime-Version: 1.0

On Sun, 4 Aug 1996, Alexander V. Lukyanov wrote:

> > >>        int main( int argc, char **argv, char **environment )
> >  
> > Shouldn't that be:
> >          
> >           int main( int argc, char **argv, int envc, char **environment)
> >                                             ^^^
> > This is how HighC and MSVC defines it.
> 
> Another reason not to use non-standard features and that particular
> one. The first form comes from Borland and is correct in Borland C.
> Although it can be used in djgpp too, don't use it! Use getenv instead.

Hmmm...  I always thought that ANSI C allows this:

	int main (int argc, char *argv[], char *environ[])

Isn't that so?  Don't have my ANSI C reference handy, but otherwise I'm 
pretty sure it's so.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019