Article View: comp.sys.apple2.gno
Article #284Re: Parameters of main()
From: Amrit Chauhan
Date: Tue, 17 Nov 1992 14:59
Date: Tue, 17 Nov 1992 14:59
52 lines
2246 bytes
2246 bytes
Soenke Behrens writes
> achauhan@warsaw.math.macalstr.edu (Amrit Chauhan) writes:
> >Soenke Behrens writes
> >> chauhan@aristotle.ils.nwu.edu (Amrit Chauhan) writes:
> Yeah, let's nest ;)
If you insist .... ;)
> >> Don't do that. It's not illegal, but better be explicit. I.e.
> >> int
> >> main (int argc, char *argv[])
> >> {
> >> even if you do not use argc and argv.
> >Hmm, I should probably get in the practice of doing this. What
> >would I do if I wasn't writing a shell program? I mean, would you
> >still need to be explicit about what gets passed to main?
> Hmm. On the GS, you could also say int main (void) or void main (void)
> for a shell program. There are architectures that don't like that, though.
> When writing a desktop program that is not to be called as a shell program,
> I'd say go with 'void main (void)', as you neither get parameters nor return
> an exit value.
> > C Primer Plus
> Is it any good? The book, I mean? From what you told us, I have my doubts :)
I don't think the book is all that bad at all...granted, it didn't really
"teach" me a couple of little quirks but that's ok...that's what you're here
for :) But, I think that I'm learning what I need to know to at least get
started. There are a couple of things I would change, but all in all, it's
still a pretty good book.
> >..and don't we know how big MY bank account is :) yeah right..
> Sure :) But don't feel bad, I do not have those books (Algorithms in C,
> the Knuth series, Programming Pearls), either ... though
> I won't be able to avoid buying them *sigh*
> Yours
> Soenke
Thanks again Soenke :)
--
< > +++++++++++++++++++++++++++++ < >
<++> Amrit Chauhan <++>
<++> achauhan@math.macalstr.edu <++>
< > +++++++++++++++++++++++++++++ < >
Technical Details
Message-ID:
<Bxv8Bs.541@news.iastate.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!newsReferences:
<behrenss.721948931@hphalle6>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.apple2.gno Path: arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!news From: achauhan@warsaw.math.macalstr.edu (Amrit Chauhan) Subject: Re: Parameters of main() Message-ID: <Bxv8Bs.541@news.iastate.edu> Sender: news@news.iastate.edu (USENET News System) Organization: Iowa State University, Ames IA References: <behrenss.721948931@hphalle6> Date: Tue, 17 Nov 1992 14:59:50 GMT Lines: 55