cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/29/00:45:22

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

On Fri, 14 Aug 1998 18:18:41 -0800, Bjorn Hansen <viking AT xyz DOT net>
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. "

- Raw text -


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