Talk:Ada Programming/Control
Add topic"In Ada, conditional statements with more than one conditional do not use short-circuit evaluation by default. In order to mimic C/C++'s short-circuit evaluation, use and then or or else between the conditions."
At this point I haven't seen how to write if clauses with more than one conditional. --139.19.14.55 (discuss)
goto
[edit source]Why is there a rant about how "GOTO did nothing wrong" in the middle of a book about how to write Ada. This seems pretty out of place IMO and comes off more as a personal blog than an informational source. 68.113.231.171 (discuss) 01:10, 11 February 2021 (UTC)
- Yes, you are right. I've tried to balance it and add more valuable information. Note that anyone is welcome to edit this wikibook, so don't hesitate to improve the section by yourself if you feel there is still room for improvement. ManuelGR (discuss • contribs) 16:37, 20 February 2021 (UTC)
The Wiki code is divided in many templates?
[edit source]Hi! I want to edit this page, and I got a little confused... I found out that this page is divided in several templates, one per paragraph or two of each section. For instance, the first section "Conditions" up to the first Ada code is Template:Computer Programming/Control/1, then a paragraph is at Template:Computer_Programming/Control/1.1. It is rather difficult (and a bit uncomfortable) to find the correct template to change a paragraph, or find two or more templates to move portions of text around.
I was about to unify all the text in the templates into the original page, but I stopped wondering if there was a reason that eludes me: why is this page divided in so many templates? can I copy the template texts and paste it on the original page to make a single Wiki code page?
Please, if there is a convention or an already discussion about dividing a page into templates, can you tell me where I can find it? Thanks. Cngimenez (discuss • contribs) 18:26, 15 March 2025 (UTC)
- Welcome, Cngimenez! The reason why the page is divided in templates, it's because the same text is used in different wikibooks. This is how it was originally designed by the original author, @Krischik. This is not the first time the transclusion has been questioned. I don't know if Krischik will be available to comment, but if he doesn't, I don't mind if you copy all the content to the Ada wikibook. That will make contributing easier, and keeping in synchronization with Computer_Programming/Control is not important, in my opinion. ManuelGR (discuss • contribs) 18:56, 15 March 2025 (UTC)
- One thing, if you finally copy the content into this page, don't forget to mention the original template page, so the contributions can be tracked in the history, as required by policies. ManuelGR (discuss • contribs) 18:58, 15 March 2025 (UTC)
- Oh, but how should I do that?
- I edited an example at the "goto" section. It's history shows that the template name (or "template call/template macro") was removed.
- I modified it removing this text:
{{:Template:Computer Programming/Control/4}}
- and then, adding the following text (the template contents and a comment):
=== ''goto'' === 'Goto'' transfers control to the statement after the label. <!-- copied from template: {{:Template:Computer Programming/Control/4}} -->
- Is this right?
- If it is right I continue copying the rest of the templates, if it is not I revert the change I did. Cngimenez (discuss • contribs) 14:41, 29 March 2025 (UTC)
- The important part is that, when someone reviews the history, can determine who's the author of the contribution. What you have done is sufficient, but I think it is better to mention it in the Summary field of the change. Something like: "Moving content from Template:Computer Programming/Control/4", and then in the template, if you are going to remove the text there, something like "Moving content to Ada Programming/Control". If you do that, make sure that any page that was transcluding the template is updated with a copy of the content.
- That is what the Wikipedia policy on copying and merging requires. ManuelGR (discuss • contribs) 16:42, 29 March 2025 (UTC)
- I think I will not remove the text from the templates because I cannot be sure how many articles use the templates... Also, I haven't red the Computer Programming wikibook yet, so I am not confident to edit it properly.
- Right, then I'll add the template name at the summary. Also, I'll add the date along with the template name at the comment just in case. Anyway, if I'm mistaking something or doing the copying wrong, please, tell me. Cngimenez (discuss • contribs) 19:52, 29 March 2025 (UTC)
- You can see where a page is used (either transcluded or linked) with the "What links here" tool from the Tools menu.
- https://en.wikibooks.org/wiki/Special:WhatLinksHere/Template:Computer_Programming/Control/4 ManuelGR (discuss • contribs) 18:26, 10 April 2025 (UTC)
- One thing, if you finally copy the content into this page, don't forget to mention the original template page, so the contributions can be tracked in the history, as required by policies. ManuelGR (discuss • contribs) 18:58, 15 March 2025 (UTC)