delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/16/12:01:52

Message-Id: <1.5.4.32.19971216165626.006cc594@dce03.ipt.br>
Mime-Version: 1.0
Date: Tue, 16 Dec 1997 14:56:26 -0200
To: fighteer AT cs DOT com, djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: Scripting language library

At 18:52 15/12/97 +0000, John M. Aldrich wrote:
[snipped]
I can only second you on the snipped comments, John!

>Umm, I would like to point out here that 'void' did not exist in
>pre-ANSI compilers.  A K&R definition of main might look like "main()",
>or "int main()", but never "void main()".  The 'void' construct was
>probably introduced by programmers who were too lazy to put a 'return'
>statement at the end of main(), and who then wrote books and taught
>courses that passed on their flawed methodology.  Perhaps, at some
>point, they stressed that "void main()" is not correct, but by then it
>was too late.
>
The "void" construct was not "introduced by programmers who were too lazy to
put a 'return'" as you surmise, but instead was "created" via typedef in pre
ANSI compilers by people that would like to emphasize in their prototypes
that some procedure did not return anything and/or some functions had nor
arguments. The ANSI Standard made it have more formal uses.

[more stuff snipped]

I commented this matter in another mail.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019