[University] Error in AdaCore University Home Courses Ada 003 - Programming in the Large Type Safety
digitig
digitig at gmail.com
Sun Jun 25 02:14:16 CEST 2017
There is an error in quiz question 5 of Home Courses Ada 003 -
Programming in the Large Type Safety.
According to the quiz, there is no error in the code:
subtype T is Integer range 1 .. Integer'Last;
V1: Integer := 0;
V2: T := V1;
The value of V1 is not in the range of T, so this code gives a compiler
warning and would raise a runtime error.
The quiz says that only one thing has changed in the code from question
4, but two things have changed: the addition of "subtype" and the change
in the range.
Regards,
Tim Rowe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/university/attachments/20170625/65d2de13/attachment-0001.html>
More information about the University
mailing list