"wizwx" <wi****@gmail.comwrote in message
news:11*********************@v45g2000cwv.googlegro ups.com...
>
Will you please clarify what is a narrow type and what is not? Is long
a narrow type?
In the old days, when men were men individual responsibility was a cherished
value, a good programmer could manage function parameters himself and
wouldn't rely on the compiler to spot errors.
int func();
meant that anything could be passed so long as one understood that the
compiler was going to promote all "narrow" types (char becomes int, float
becomes double, etc.). By "narrow" type, the original poster meant "a type
that is promoted to something else when put in the argument list".
However, as programmer skill declined and new standards emerged, it was
decided that:
int func(void);
would mean no parameters.
I don't believe in function prototypes or compiler warnings. They slow down
the compiler. I've calculated that a programmer who uses function
prototypes and compiler warnings may lose, over a lifetime of programming,
as much as 5 seconds due to the compiler processing the prototypes and
issuing the warnings.
However, if you want to do the stylish thing and use them, you should never
leave an argument list empty ...
--
David T. Ashley (dt*@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)