[University] Error in Quiz
Simon Beàn
simon.ea.bean at gmail.com
Fri Jan 12 03:42:11 CET 2018
Hi,
I am taking your courses online (http://university.adacore.com). Very good! Thank you!
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.
That said, thank you for making this resource available to the public. It had been awhile since I had not had fun programming. Ada is definitely a beautiful thing.
Cordially,
Simon Beàn
simon.ea.bean at gmail.com <mailto:simon.ea.bean at gmail.com>
www.linkedin.com/in/simon-beàn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/university/attachments/20180111/ccf0d0b4/attachment.html>
More information about the University
mailing list