What is the difference between `long_integer` and `integer` in ada language?
14 August 2023 at 02:14
with ada.text_io;
procedure numbers is
int1 : integer := 2147483647; --almost 4 bytes
int2 : integer := -2147483647;
lng1 : long_integer := 2147483647;
lng2 : long_integer := -2147483647;
begin
ada.text_io.put_line(int1'image);
ada.text_io.put_line(int2'image);
ada.text_io.put_line(lng1'image);
ada.text_io.put_line(lng2'image);
end numbers;
result :
2147483647
-2147483647
2147483647
-2147483647
I am new to this programming language and suddenly found this long_integer
and integer
datatypes in the ada language are the same in size and the type of data they can represent is there any key difference between these two datatypes ?