4 ms·
Odd, that was what I was told by our Ada teacher, and the book has all caps.
by protomyth 6y ago
Odd, that was what I was told by our Ada teacher, and the book has all caps.
- henrikeh 6y agoIt is indeed a common misconceptions, but here is the official Ada 83 Language Reference Manual on the subject: http://archive.adaic.com/standards/83lrm/html/lrm-02-09.html#2.9 http://archive.adaic.com/standards/83lrm/html/lrm-02-09.html... > Reserved words differing only in the use of corresponding upper and lower case letters are considered as the same (see 2.3). Interestingly, the manual itself doesn't even use upper case: > For readability of this manual, the reserved words appear in lower case boldface. So even the Ada standard recognizes the upper case is less readable and undesired. Case insensitivity also applies to identifiers (variable names, type names etc.) (sec 2.3) and that is a definitely an archaic feature, but the GNAT compiler has the helpful -gnatya style check which enforces the Pascal_Case style: https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gnat_ugn_unw/Style-Checking.html#Style-Checking https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gnat_ugn_unw/Style-... --- Another common misconception is that function/procedure names (designators) must appear after the `end`. That is optional: > If a designator appears at the end of a subprogram body, it must repeat the designator of the subprogram specification. http://archive.adaic.com/standards/83lrm/html/lrm-06-03.html#6.3 http://archive.adaic.com/standards/83lrm/html/lrm-06-03.html...
- coliveira 6y agoSome people prefer all caps for keywords, just like they do nowadays on SQL code. But the language is case insensitive, you can choose otherwise.