Questo è dal manuale online di riferimento Ada: http://www.adaic.org/resources/add_content/standards/05rm/RM.pdf (sezione 2,3)Ada numerici letterali e Sottolineato
A decimal_literal is a numeric_literal in the conventional decimal notation (that is, the base is ten).
Syntax
decimal_literal ::= numeral [.numeral] [exponent]
**numeral ::= digit {[underline] digit}**
exponent ::= E [+] numeral | E – numeral
digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
An exponent for an integer literal shall not have a minus sign.
Static Semantics
**An underline character in a numeric_literal does not affect its meaning.** The letter E of an exponent can be
written either in lower case or in upper case, with the same meaning.
Se faccio
my_literal ::= 123_456;
cosa fa la sottolineatura (sottolineato) significa? Dice che non influisce sul significato. Allora a cosa serve? Sono sicuro che c'è una risposta semplice, ma leggere e riesaminare il passaggio non mi ha aiutato.
Quindi è interamente per la leggibilità del programmatore? –
Sì. Ada aveva la manutenibilità come obiettivo di progettazione. – Shark8
È * necessario * essere consapevoli del fatto che due sottolineature consecutive sono un errore. [IIRC] – Shark8