comp.lang.ada
 help / color / mirror / Atom feed
From: Serge Robyns <serge.robyns@gmail.com>
Subject: Re: Issue with SPARK 2014
Date: Wed, 14 Oct 2015 08:25:43 -0700 (PDT)
Date: 2015-10-14T08:25:43-07:00	[thread overview]
Message-ID: <1634898a-7363-4e21-8772-4e17848a70ef@googlegroups.com> (raw)
In-Reply-To: <abba071f-dad0-40ea-b341-1385dcab91d9@googlegroups.com>

On Tuesday, 13 October 2015 23:40:42 UTC+3, joak...@kth.se  wrote:
> Dear Serge,
> 
> Please make a compilable example and put the code for example on github. As the code stands now it is not known exactly what Number_Of_Columns and Columns are.
> 
> Best regards,
> Joakim Strandberg

These are the most important definitions:

   Number_Of_Columns : constant := 7;
   First_Column : constant := 1;
   First_Row : constant := 1;
   Winning_Move : constant := 4;
   Nil_Move : constant := 0;

   type Player_Type is (Nobody, Human, Computer);
   type Board_Type is private;

   subtype Move_Range is Natural range Nil_Move .. Number_Of_Columns;
   type Valid_Move_Range is range First_Column .. Number_Of_Columns;
   subtype Column_Range is Valid_Move_Range;
   subtype Row_Range is Valid_Move_Range;

   type Moves is new Move_Range;
   type Columns is new Column_Range;
   type Rows is new Row_Range;

Some of these could have been done differently in Ada2012 (but the code dates from 95 days).


  reply	other threads:[~2015-10-14 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 17:37 Issue with SPARK 2014 Serge Robyns
2015-10-13 20:40 ` joakimds
2015-10-14 15:25   ` Serge Robyns [this message]
2015-10-14  6:16 ` Simon Wright
2015-10-14 15:23   ` Serge Robyns
2015-10-14 20:04 ` Stuart
2015-10-15  8:44   ` Phil Thornley
2015-10-15 11:23     ` Stuart
2015-10-15 17:28       ` Serge Robyns
2015-10-18  8:44         ` Phil Thornley
2015-10-19  9:13           ` Serge Robyns
replies disabled

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