So I was learning about application-defined types in Ada and it seems like typedef in C programming language. However, if I created a new name for a predefined type in C using typedef I can still do this:
typedef int my_int;
int a = 5;
my_int b = a; -- No problem
But if I try this on Ada:
type my_int is new Integer;
a : Integer := 5;
b : my_int := a; -- Causes some error
So my question is that is my understanding correct that in C my_int is just an alias or a new name of type int and not a new type whereas in Ada my_int is a completely different data type itself not just a new name for type Integer.