From: Pascal Obry <pascal@obry.net>
Subject: Re: Strategies with SPARK which does not support exceptions
Date: Thu, 17 Jun 2010 21:54:35 +0200
Date: 2010-06-17T21:53:45+02:00 [thread overview]
Message-ID: <4c1a7d49$0$2994$ba4acef3@reader.news.orange.fr> (raw)
In-Reply-To: <op.vegat3qjule2fv@garhos>
Yannick,
> The only one thing which seems simple and clean enough I could figure,
> is to use a Boolean variable, named “OK”, and a sequence of “if OK then”
> statements. That is, execution of one sequence of statements, which set
> OK to False is something goes wrong, and execute clean-up statements by
> the way. Then a next sequence of statements wrapped in a “if OK then”
> which do the same, and so on with next statements groups which are also
> wrapped in a “if OK then” (as many as needed).
I don't understand. SPARK code cannot raise exception, so why should the
code deal with exceptional code????
There is no exception, so not error to check... I don't see the point of
the Ok variable.
I'm probably missing something, can you clarify?
Pascal.
Hum, while writing this I see one case where this can be used... It
is if exceptions are used as control flow. To me this is just very
bad practice.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net - http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
next prev parent reply other threads:[~2010-06-17 19:54 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 [this message]
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
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