Message-ID: <000901be8480$faa2b4c0$755d44ce@jmiddle> From: "Sean Middleditch" To: References: <3 DOT 0 DOT 6 DOT 16 DOT 19990411171513 DOT 2c4fdadc AT pop DOT detroit DOT crosswinds DOT net> Subject: Re: Undocumented Keyword... Date: Sun, 11 Apr 1999 21:08:29 -0400 Organization: AwesomePlay Productions MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Reply-To: djgpp AT delorie DOT com try is part of C exception handling... I never use it myself, but I've seen it covered intesively in a book Jamsa's C/C++ Programmer's Bible. Basically, try initiates an excpetion handler, and some other code (function, child programs, etc.) can call a throw statement (and exception), and the exception is caught by the the catch statement in the try block: try { printf ( "Some text\n" ); throw; printf ( "You'll never see this text\n" ); } catch { printf ( "Exception caught\n" ); } It has many various uses, but I've never used them for anything that I couldn't write much more specific code for... the only REALLY good use I can think of is catching excpeption in child programs. Sean Middleditch of AwesomePlay Productions http://members.xoom.com/aweplay aweplay AT iname DOT com ----- Original Message ----- From: Thomas J. Hruska Newsgroups: comp.os.msdos.djgpp To: Sent: Sunday, April 11, 1999 5:15 PM Subject: Undocumented Keyword... > As I was writing a program, I accidentally came across the following keyword: > > try > > I checked to see if there was help available on this keyword in both > RHIDE's docs and also to see if Borland Turbo C/C++ v3.1 had the same > keyword. Both IDEs have the same keyword, but neither have documentation > on it. I searched my C/C++ books for such a keyword and I can't find > anything. > > Is this just a bug? If not, what does 'try' do? I can't figure this out. > I will check one other IDE tomorrow (Monday) to see if the same thing > happens in a later version of Borland C/C++ (4.5, I think). > > > Thomas J. Hruska -- shinelight AT detroit DOT crosswinds DOT net > Shining Light Productions -- "Meeting the needs of fellow programmers" > http://www.geocities.com/SiliconValley/Heights/8504 > http://click-on.to/shinelight > >