🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #1185

Re: Pascal program works but not C program!

#1185
From: Tanmoy Bhattacharya
Date: Fri, 19 Jan 1996 16:37
35 lines
2224 bytes
--text follows this line--
In article <4dmpv0$t77@fangz.com> shad@fangz.com (Shadow.King)
writes: 
<snip>
   : > 
   : > void main(int argc,char *argv[])
   :    ^-----------------------------This one too, but not too serious
<snip>
   This isn't really a problem, it's usually just the error code that the 
   program returns to dos when it exits. As far as I know it doesn't HAVE to 
   do this so just void main should be fine, I usually do the saem thing 

Why don't you make an attempt to know instead of trying to think:
especially when thought leads you to the wrong answer?

Please look at the FAQ available from rtfm.mit.edu if you do not find
any decent C book around. (And yes, I am aware that many books do get
it wrong.)

   with simple programs that don't need to set the error level on exit and 
   I've had no problems whatsoever with it. It is if the program is supposed 
   to return an error level though.

It is not fine to declare main as void: whether the program is simple,
complex or gobbledygook; if you want to write in standard C.

Cheers
Tanmoy
--
tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
<http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID: <TANMOY.96Jan19093714@qcd.lanl.gov>
Path: arc1-ca.pugleaf.net!newshost.lanl.gov!tanmoy
References: <4cdpr2$psi@lugb.latrobe.edu.au> <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4dmpv0$t77@fangz.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newshost.lanl.gov!tanmoy
From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
Newsgroups: alt.msdos.programmer,comp.lang.c
Subject: Re: Pascal program works but not C program!
Followup-To: alt.msdos.programmer,comp.lang.c
Date: 19 Jan 1996 16:37:14 GMT
Organization: Los Alamos National Laboratory
Message-ID: <TANMOY.96Jan19093714@qcd.lanl.gov>
References: <4cdpr2$psi@lugb.latrobe.edu.au>
 <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il>
 <4dmpv0$t77@fangz.com>
NNTP-Posting-Host: qcd.lanl.gov
Mime-Version: 1.0
Content-Type: text
In-reply-to: shad@fangz.com's message of 18 Jan 1996 19:51:44 -0500