Article View: borland.public.cppbuilder.nativeapi
Article #13122Re: Returning ERRORLEVEL
From: Remy Lebeau (TeamB)
Date: Tue, 28 Oct 2003 02:51
Date: Tue, 28 Oct 2003 02:51
23 lines
1414 bytes
1414 bytes
"Fishface" <invalid@ddress.ok?> wrote in message
news:3f9dd481@newsgroups.borland.com...
> I did this from a console mode program and set the return value from
> main(). I just tried:
>
> exit(5)
>
> ...(from stdlib.h) on a button click and it did set the errorlevel
properly.
That is one way to do it. The other way is to simply specify the desired
value as the return value for main(), ie:
int main()
{
//...
return 5;
}
Gambit
Technical Details
Message-ID:
<3f9dd8f9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f9d9ab0@newsgroups.borland.com> <3f9dd481@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6211acfb31792 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-27 19:09:07 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f9d9ab0@newsgroups.borland.com> <3f9dd481@newsgroups.borland.com> Subject: Re: Returning ERRORLEVEL Date: Mon, 27 Oct 2003 18:51:09 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.75 Message-ID: <3f9dd8f9$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067309305 67.22.137.75 (27 Oct 2003 18:48:25 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail