From: wpp AT brinet DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: 2 quick questions Date: Sat, 29 Aug 1998 01:22:41 GMT Organization: http://extra.newsguy.com Lines: 31 Message-ID: <35e75646.2796107@cnews.newsguy.com> References: <35D4F001 DOT 4A3E2B2D AT xyz DOT net> NNTP-Posting-Host: p-842.newsdawg.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Fri, 14 Aug 1998 18:18:41 -0800, Bjorn Hansen wrote: >1] what does the exit code tell you? > >2] why does the compiler have a warning message if you don't use a >caste? when you do something like this > >int i; >int *ip; >ip=i; > >instead of this > >int i; >int *ip; >ip=(int *)i; > > >Bjorn Hansen > RE 1] the exit code from main is passed back to the OS. MS-DOS uses this value to set the environment variable errlevel. You can use that value in a batch file to control batch file processing. RE 2] The type cast is used to keep programmers from doing dumb things. In effect it tells the compiler "Hey, I know this isn't a normal assignment, but do it anyways. "