From: I1269U Newsgroups: comp.os.msdos.djgpp Subject: Exit codes? Date: Thu, 24 Jun 1999 01:38:07 GMT Organization: Deja.com - Share what you know. Learn what you don't. Lines: 32 Message-ID: <7ks25v$o7s$1@nnrp1.deja.com> NNTP-Posting-Host: 206.107.126.39 X-Article-Creation-Date: Thu Jun 24 01:38:07 1999 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) X-Http-Proxy: 1.1 x31.deja.com:80 (Squid/1.1.22) for client 206.107.126.39 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I've used several different compilers (depending on where I was and what the people there had), and have recently begun using dgjpp. There are a few quirks here and there, but overall, I believe it is comparable to any other compiler, especially for the price. However, I've had this annoying thing happening that I'm not really sure about. You know how djgpp displays the exit code upon program termination (when running it from within DJGPP that is)? Well, no other compiler that I've used has done that, and I often see exit codes other than 0 pop up. For instance, just a few minutes ago, I had written a simple function that strips any leading and trailing spaces from any number of strings (variable argument list), and I tested it in a simple tester program. It consisted of about four string declarations (which were also definitions, i.e. char string[10] = " Hello ";), a printf() printing them, a call to TrimSpaces, and the a printf() of the strings after they were trimmed. When I'd run it, it would go through without any kind of visible problem, but it was saying the exit code was 10 (0x000a). Of course, the other compilers I've used didn't display the exit code, so I don't know if this is normal or not. It's been my experience, though, that the exit code is usually 0, or 1 (when I exit on purpose). Is this a normal exit code? And if not (or even if so), where can I get a listing of exactly what the exit codes are and what they mean? Thanks in advance. BTW, I didn't post the code, cause frankly, I don't really care about the specifics of this program. I just want info on the exit codes, and if exit code 0x000a is something that would be specific to my code for some reason, just let me know and point to where I can get info on what it might mean on my own. Thanks. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.