Mail Archives: djgpp/1998/08/29/00:45:22
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 -