On 27/11/10 17:53, Tobias Fröschle wrote:

>> Puts() needs #include<stdio.h>  or at least defining correctly!
> It should, for the sake of art, but doesn't need to.
Hmm. Not declaring a function, even one returning int (the default
return type) is listed in my book of common C mistakes.

>> Main() always returns int.
>> Main always takes two parameters int and char **.
> It should, to generate anything maintainable, but doesn't need to. C
> allows you to ignore return values.
I know it allows me to do so, but just because I can do something
doesn't mean that I should! ;-)

Seriously, I agree. But the fact that main() is not returning a value is
not the same as ignoring one, because it's the OS that should get the
return from main() not some other part of the C program itself - which
happily lets you, as you say, ignore return values.

> I can do even better (alas, not on the QL - And: I'll probably never get
> employment as a Java programmer):
Neither will I I'm afraid, I loathe and detest Java with a vengeance!
Too many problems at work caused by too many [bloody] java programmers
(I use the term loosely) who reinvent the bloody wheel in java every
single program they ever write.

Sometimes I despair!

I wonder how the fizzbuzz  program would be written using quantum
computing - which knows all the answers before you even ask the question!


Cheers,
Norman.

-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to