Article View: comp.sys.apple2.gno
Article #272Re: Parameters of main()
From: Soenke Behrens
Date: Mon, 16 Nov 1992 21:22
Date: Mon, 16 Nov 1992 21:22
40 lines
2107 bytes
2107 bytes
achauhan@warsaw.math.macalstr.edu (Amrit Chauhan) writes:
>Soenke Behrens writes
>> chauhan@aristotle.ils.nwu.edu (Amrit Chauhan) writes:
Yeah, let's nest ;)
>> 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 :)
>..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
--
===========================================================================
More than silver, more than gold, I need ! behrenss@informatik.
electricity. I need it for my dreams. ! tu-muenchen.de
(RACTER) ! FIDO: 2:246/13 Soenke Behrens
Technical Details
Message-ID:
<behrenss.721948931@hphalle6>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!informatik.tu-muenchen.de!hphalle6!behrenssReferences:
<behrenss.721912181@hphalle6> <BxtIH1.3wF@news.iastate.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.apple2.gno Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!informatik.tu-muenchen.de!hphalle6!behrenss From: behrenss@Informatik.TU-Muenchen.DE (Soenke Behrens) Subject: Re: Parameters of main() References: <behrenss.721912181@hphalle6> <BxtIH1.3wF@news.iastate.edu> Sender: news@Informatik.TU-Muenchen.DE (USENET Newssystem) Organization: Technische Universitaet Muenchen, Germany Date: Mon, 16 Nov 1992 21:22:11 GMT Message-ID: <behrenss.721948931@hphalle6> Lines: 40