Template talk:Ada

Error in Integer template
There is a mistake in the following template:

gives

This should give 16#FFFF#E4.

should give 16#FFFF#E+4. Exponent character may be either case. Do we want to have both variants? BTW:

should be illegal (only positive exponents on integer).

Similar problem for real numbers (I guess, didn't check).

CKWG - Ada Magica (discuss • contribs) 19:07, 16 February 2022 (UTC)


 * There is only one actual use: Special:WhatLinksHere/Template:Ada/integer, so we can change to whatever we like, or even delete it. The current unique advantage of the template is syntax highlighting, since it doesn't have a link like the keywords or packages (or should it link to Ada_Programming/Lexical_elements?) If we keep it, I'd go for the simpler form, only one parameter for writing the literal number directly in Ada format, but it might be the case that there were reasons behind the Wiki-syntax for it to be like it is. With the current definition, the sample usage should be . Another option is adding the 'E' to the template, that seems possible, but what's the intention?. Let's try some variations with the current template:
 * gives
 * gives
 * If the second is working, I don't see the point of using and supporting the first version.
 * -- ManuelGR (discuss • contribs) 20:47, 16 February 2022 (UTC)
 * I do not see any gain in this template - it's longer to write, uses braces which are awkward to type, and I do not see a benefit in highlighting a number. And what's more: In all the Ada Programming pages I've ever read, I've never found a use; I even had not the slightest idea that there might be template for it. If you look at the second variation above, it only complicates the typing:
 * The gist of it all: Remove!
 * And on this page, there are many more templates whose benefit is questionable and of which I doubt there is any use. Why would one use a template for each operator in an expression?
 * Mistake on Ada-specific citation templates:
 * &lt;nowiki&gt; &lt;/nowiki&gt;
 * It seems the id has priority for the link, but the page does not tell this fact. Or is par ignored and only id evaluated? CKWG - Ada Magica (discuss • contribs) 10:30, 17 February 2022 (UTC)
 * OK, we can get rid of Template:Ada/integer. Note, however, that we can use tools to assist in the conversion of the source code examples. I've used ASnip for generating the specifications of the Ada Standard Library. It doesn't include these templates for numbers, though. Regarding the template for operators, it is heavily used: Special:WhatLinksHere/Template:Ada/operator. I find this case useful, because it links to the page explaining the meaning and usage of the operator. Regarding the Template:Ada/2005/Cite RM, the example is wrong, as you have noticed. According to the resulting URL, only the id is used for the link (for the anchor). The par parameter is only used for the displayed text. I don't know whether one is supposed to look at the HTML source code to get the `id`, but technically, there isn't a better way, since there is no relation between the paragraph identifiers and the anchor id. I'll fixed the example. -- ManuelGR (discuss • contribs) 19:53, 17 February 2022 (UTC)