TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Wankadia
from: Michael Stapleton
date: 1996-11-18 11:55:16
subject: Auto string-length determination

Hi Paul,

PW>> void main() {

PE>> Which besides being ILLEGAL returns RANDOM errorlevels to DOS.

PW> Well now -- I don't know if the Feds will be jumping down my neck
PW> just cuz I declare main() as void :)

No, but we will. :)

PW> BTW don't you like Russian Roulette...?  

Not as such...

PW>> I write my programs properly (sort of).  If I NEED to return a
PW>> value from my programs, I usually use exit() or something...

The return from main has the same effect as calling exit.

PE>> exit(x) is as valid as return(x), but I use the latter to avoid
PE>> getting a warning message from various compilers.  BFN.  Paul.

PW> I usually only return values if some sort of critical error occurs.

No, you always return a value, whether you mean to or not.

PW> BTW why would exit() cause a warning?

The exit() doesn't cause a warning; not having a return statement in a
function that is declared to return something does.

Michael Stapleton of Graphic Bits.
@EOT:

--- Msged/AM 4.00
* Origin: Graphic Bits (3:711/934.33)
SEEN-BY: 711/808 934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.