Talk:Loops/Nested: Difference between revisions

From Rosetta Code
Content added Content deleted
(added a query about numbers versus integers. -- ~~~~)
 
Line 1: Line 1:
==task clarification==
==Task Clarification==


When the task description said numbers from 1..20, did it mean integers?
When the task description said numbers from 1..20, did it mean integers?
<br>If not, the REXX example could also use numbers with decimal parts.
If not, the REXX example could also use numbers with decimal parts.
<br>Some languages (like REXX) can handle both at the same time.
Some languages (like REXX) can handle both at the same time.

<br>
<br>Also, it wasn't stated explicity, but I assume the array could be fully populated, but without an element being equal to "20". -- [[User:Gerard Schildberger|Gerard Schildberger]] 02:54, 15 May 2012 (UTC)
Also, it wasn't stated explicity, but I assume the array could be fully populated, but without an element being equal to "20". -- [[User:Gerard Schildberger|Gerard Schildberger]] 02:54, 15 May 2012 (UTC)
: I'd assume it meant integers; if not, the likelihood of encountering a “20” is too small. (Yes, it could be implemented otherwise, but what would be the point of that?) Another reason for assuming integer is that it says <math>[1\ldots 20]</math> and not <math>[1.0\ldots 20.0]</math> –[[User:Dkf|Donal Fellows]] 10:23, 15 May 2012 (UTC)

Revision as of 10:23, 15 May 2012

Task Clarification

When the task description said numbers from 1..20, did it mean integers? If not, the REXX example could also use numbers with decimal parts. Some languages (like REXX) can handle both at the same time.

Also, it wasn't stated explicity, but I assume the array could be fully populated, but without an element being equal to "20". -- Gerard Schildberger 02:54, 15 May 2012 (UTC)

I'd assume it meant integers; if not, the likelihood of encountering a “20” is too small. (Yes, it could be implemented otherwise, but what would be the point of that?) Another reason for assuming integer is that it says and not Donal Fellows 10:23, 15 May 2012 (UTC)