Ada程序编译不过 提示 Other is undefined
--filename:comp.adb
WITH Ada.Text_IO; USE Ada.Text_IO;
WITH Ada.Integer_Text_IO; USE Ada.Integer_Text_IO;
PROCEDURE Comp IS
FUNCTION Compare (A:Integer; B:Integer) RETURN Integer IS
BEGIN
RETURN (A - B);
END Compare;
X,Y,Result:Integer;
BEGIN
Put ("Enter A:"); Get (X);
Put ("Enter B:"); Get (Y);
Result :=Compare (X,Y);
CASE Result IS
WHEN Integer'First..-1 =>Put_Line ("A<B.");
WHEN 0 =>Put_Line ("A = B.");
WHEN 1..Integer'Last =>Put_Line ("A>B.");
WHEN Other=>NULL;
END CASE;
编译器错误提示:19:15: "Other is undefined"
[解决办法]
WHEN Other=>NULL;
=================
WHEN Others=>NULL;