[Uml-devel] Re: CVS developer access

Sebastian Stein s5228 at informatik.htw-dresden.de
Mon Oct 14 11:09:12 UTC 2002


Jens Krüger <je.krueger at web.de> [021014 17:45]:
> that the readability of a code grows, you write a return statement at the
> end of a void function.  I know that the current compiler do not expect a
> return statment if one leaves 
> the function. In the current specification of C++ is written, that the 
> compiler add automatically the 'return 0' statement if it is missed. I don't 
> know, what the next generation of compilers tell to this problem. I try to 
> write my code in that way, that it looks good, is efficient and short. The 
> only exception from the shortness of code  is the addition of the return 
> statement in a void function. If all other say, we should not write this 
> return statements, I will respect this decision. 

Have you tried this with VC++ 6.0 for Windows? I mean it is a little bit
offtopic but if I remember right, vc++ will tell you, that a void function
is not allowed to return anything. So the compiler doesn't accept return; in
a void function.

Nevertheless, if the source compiles I don't have a preference about a
return should be added or not.

Steinchen
-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial




More information about the umbrello-devel mailing list