[University] Error in Quiz

Raphaël Amiard amiard at adacore.com
Fri Jan 12 11:43:58 CET 2018


Hello Simon,

On 12/01/2018 03:42, Simon Beàn wrote:
> Hi,
> 
> I am taking your courses online (http://university.adacore.com). Very good! Thank you!

Thank you very much !


> 
> And I came across an incongruity.
> 
> Ada 003 - Programming in the Large
> 
> Lesson 2 - Type Safety
> Quizz 5
> 
> subtype T is Integer range 1..Integer’Last;
> 
> V1 : Integer := 0;
> V2 : T := V1;
> 
> 
> In this quiz, we have to check if it is correct or not. The answer provided is « Yes, it is fine because : T is a subtype of Integer. Therefore, V1 and V2 are of the same type. »
> 
> But V1 is out of range of T, as a result it will raise a Constraint_Error exception.

You are correct indeed, the wording should probably be rephrased !

We are working on a new version of the university website at the moment, so do 
not expect a quick fix. That said, thanks a lot for your input, it is appreciated.


-- 
Raphaël Amiard <amiard at adacore.com>
AdaCore Paris, France.
+331 49 70 67 54


More information about the University mailing list