comp.lang.ada
 help / color / mirror / Atom feed
From: Alexandre K <alexandre.nospam@gmail.com>
Subject: Re: Strategies with SPARK which does not support exceptions
Date: Fri, 18 Jun 2010 14:51:11 -0700 (PDT)
Date: 2010-06-18T14:51:11-07:00	[thread overview]
Message-ID: <9e783a9c-f201-4cd9-901e-e1f1da882038@w12g2000yqj.googlegroups.com> (raw)
In-Reply-To: 610aab02-26cd-4d66-9b45-ebdee71c8aad@c10g2000yqi.googlegroups.com


> Well, I do not know if 'goto's are allowed in SPARK, but that is the
> solution that sometimes I use when I need to write code in the-
> language-whose-name-is-a-single-letter :-).  I know that it could
> sound heretical, but this is one of the two cases where, I believe,
> using goto is not so bad.  I am thinking something like

Hi everyone,

Well, Goto are, as exceptions, not allowed in Spark.
To answer to Yannick, the way to replace exception is to use Boolean,
or Enumerates in an "out" parameter.
It is the case when you need to use an Ada program that uses
exceptions, and you have to write
a package specification with Spark and hide the implementation in the
body. (--# hide).
The Spark_IO package is an example of hiding the use of Ada.Text_IO,
and of course File exception.

Also, I think we should not use exception to control the flow of the
program.

Alex.



  reply	other threads:[~2010-06-18 21:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 15:33 Strategies with SPARK which does not support exceptions Yannick Duchêne (Hibou57)
2010-06-17 17:11 ` Warren
2010-06-17 18:19   ` Yannick Duchêne (Hibou57)
2010-06-21 13:31     ` Warren
2010-06-21 14:10       ` Alexandre K
2010-06-17 19:54 ` Pascal Obry
2010-06-17 22:47   ` Peter C. Chapin
2010-06-18  6:07 ` Claude
2010-06-18  8:06 ` Phil Thornley
2010-06-18  8:49   ` Martin
2010-06-18 17:16     ` mockturtle
2010-06-18 21:51       ` Alexandre K [this message]
2010-06-22 17:01   ` Phil Clayton
2010-06-22 23:14 ` Claude
2010-06-23 16:22   ` Warren
2010-06-24  3:24     ` Claude
2010-06-28 13:14       ` Warren
2010-06-29  8:39         ` Stephen Leake
2010-06-29 20:05       ` Randy Brukardt
2010-06-29 20:49         ` Georg Bauhaus
2010-06-30  5:08         ` Simon Wright
2010-06-30  8:17         ` stefan-lucks
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox