Message-ID: <35894922.3FB5451E@maths.unine.ch> Date: Thu, 18 Jun 1998 17:06:43 +0000 From: Gautier de Montmollin Organization: Universite de Neuchatel MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: To person who ported PGCC to DJGPP References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mac13-23.unine.ch Lines: 39 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > > If you really want to program with exceptions, use a language > > where they are defined as standard and work: Ada. GNAT Ada 95 for > > DOS uses DJGPP 2.01 as back-end and exceptions _do_ work ! > > I like C++ and exceptions ARE a standard in the language, so I don't > see what the big deal is. It isn't that I dislike C++. But maybe is the standard too fresh ? Exceptions should work as well as loops in any compiler. The advantage in Ada is that exceptions are among the basic structures of the language, from the 1st version. Examples: 1) begin (...) if A_sym then -- LtL (Cholesky), cas symetrique DPBTRF(upper, N=> nb_eq_2, KD=> lda-1, AB=> AB, LDAB=> lapmax); else -- LU DGBTRF(M=> nb_eq_2,N=> nb_eq_2, KL=> lda-1, KU=>lda-1, AB=> AB, LDAB=> lapmax, IPIV=> pivots); end if; exception when Computation_error=> Put("pivot 0, ligne / mineur <0 d'ordre"); Put(info); raise; -- re-raise Computation_error after message end; 2) begin (...) exception when Out_Of_Range | Out_Of_Buffer_Range => null; -- SVGA end; -- Gautier -------- Homepage: http://www.unine.ch/math/Personnel/Assistants/Gautier/Montmollin.html Software: http://www.unine.ch/math/Personnel/Assistants/Gautier/Gaut_FTP.htm.