void main(void) 
Author Message
 void main(void)

Subject: void main(void)

M>I didn't realise my innocent question was going to create this much of
 >a reaction!

There are some loyal C users here that won't except anything other than
100% pure ANSI!!!

M>most people told me that void main(void) was illegal according to the
 >ANSI standard, although some said that if you don't WANT main() to
 >return a return code you ought to be able to say explicitly that no
 >value is returned to the OS.

M>Anyway, flicking through this book it seems that almost all the examples
 >have void main(void).

Yes, I noticed this, too.

M>The book is by Jack Purdum and is called "C Programming Guide",
 >published by QUE.

Although this book does use void main(void) for every example, aside
from this, the book has excellent diagrams and tips for any programmer
new to C.

M>It seems rather old, and says that the ANSI standard was only available
 >in draft form when the book was going to press.

Yes, you are correct.

M>Flicking through the books I could find in shops here, it was the only
 >one that seemed easy enough for someone as clue-free as myself.

M>I suppose I could have found a more recent book in English (I actually
 >have the Italian translation of this book) but the prices in English-
 >language bookshops here are frightening...

I still recommend "Teach Yourself C" by Herbert Schildt.  His books are
real easy to learn and everything is presented gradually.

M>I have now bought K&R2 as a backup, but it doesn't look like something
 >I can LEARN the language from. (Um. Well, I learnt 6809 code from the
 >programmer's reference card many years ago, but C seems harder... :-))

I agree.  This book isn't aimed towards first-time C programmers.

---
 t QMPro 1.52 t DON'T read the manual--just WING that sucker!



Mon, 26 May 1997 20:20:00 GMT  
 void main(void)

Quote:
>M>I have now bought K&R2 as a backup, but it doesn't look like something
> >I can LEARN the language from. (Um. Well, I learnt 6809 code from the
> >programmer's reference card many years ago, but C seems harder... :-))

>I agree.  This book isn't aimed towards first-time C programmers.

I'm just wondering where did I learn C from, because the first book about
C I read was certainly K&R1.  And when I started reading it, I was
fairly convinced that I was completely clueless about C, but now David
says that I was wrong.

This is the difference between a Schildt book and K&R:

After finishing K&R, if you read it carefully and attempted to solve
all the exercises, you _know_ C.

After finishing the Schildt book, if you want to know C, you have to read
K&R carefully, attempt to solve all the exercises and try hard to forget
all the nonsense the Schildt book has taught you.

Feel free to make your choice.

Dan
--
Dan Pop                       | The only reason God was able to make the
CERN, CN Division             | world in 7 days was he didn't have to remain

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



Tue, 27 May 1997 23:53:03 GMT  
 void main(void)

Quote:

>   There are some loyal C users here that won't except anything other than
>   100% pure ANSI!!!

It has nothing to do with loyalty.  It has to do with I'm a
professional programmer and if my programs don't work I'll lose my
job.

--

--


Senior Systems Administrator                           Person who Fixes Things



Wed, 28 May 1997 03:34:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. what's the difference between void main(void) and int main(void)

2. void main(void) or int main() ??

3. Purpose of void main (void) and Functions

4. Is void main(void) a standard or not?

5. void main(void) ????

6. void main(void) illegal??

7. void main(void)

8. Is void main(void) ANSI standard??

9. void main(void)

10. void main(void)....revisited!

11. Who cares? void main(void)

12. The making of void main(void)

 

 
Powered by phpBB® Forum Software