114 karma · joined May 18, 2017
type Angles is 0 .. 360;
subtype Acute_Angles is range Angles'First .. 90;
Subtypes can be used with the parent type without conversions.Pascal only has subranges, iirc.
Whereas Ada's first version is from 1980 and first standardised version (different to 1980) in 1983. Yeah, "ancient."
I'm looking into getting it all automated through pragma's and gpr's.
No, this is the barrier people need to overcome. Readable is good.
The code could easily be converted to later Ada versions and use C.Pointers where necessary (triple pointers), but void * are easy enough to handle now with an access to null record with convention => C.
You don't have to use the entirety of the language, you can use pragma Restrictions to get the compiler to ensure you don't use certain features. Some features don't even work for really tiny devices. Even tasking can be done one small systems, like a Z80, for example.
comp.lang.ada, reddit.com/r/ada, irc, gitter, telegram, etc.
> A, B, C, E, H, and J are variables. F is an array. D, G, and I are functions.
That was by design, because when it was designed, ide's like we have now didn't exist so being able to change a variable to an array from a function or vice versa was made easier. There is another reason and that mathematically an array is a function.