Talk:Repeat a string: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: added verbage to the 1st section header. -- ~~~~) |
m (→task clarification: added a alias for repeat (copies).) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== |
== task clarification == |
||
The goal is to obtain a string, or to print some text X times? --[[User:SenTalker|SenTalker]] 21:28, 28 October 2012 (UTC) |
The goal is to obtain a string, or to print some text X times? --[[User:SenTalker|SenTalker]] 21:28, 28 October 2012 (UTC) |
||
: I took it to mean: |
: I took it to mean: |
||
* a string is already defined (say, the contents of a variable) |
:* a string is already defined (say, the contents of a variable) |
||
* repeat that string some number of times |
:* repeat that string some number of times (or make a number of copies) |
||
* optionally show the result |
:* optionally show the result |
||
-- [[User:Gerard Schildberger|Gerard Schildberger]] 21:33, 28 October 2012 (UTC) |
:-- [[User:Gerard Schildberger|Gerard Schildberger]] 21:33, 28 October 2012 (UTC) |
||
:: I also interpreted that it is the generation of a string (that is a repetition of the input string some specified number of times) that is the goal. Printing the string in a loop would ''not'' be a correct solution, except for languages where doing output is effectively the same as producing an intermediate value (a small minority of languages). –[[User:Dkf|Donal Fellows]] 10:30, 29 October 2012 (UTC) |
Latest revision as of 21:37, 28 March 2021
task clarification
The goal is to obtain a string, or to print some text X times? --SenTalker 21:28, 28 October 2012 (UTC)
- I took it to mean:
- a string is already defined (say, the contents of a variable)
- repeat that string some number of times (or make a number of copies)
- optionally show the result
- -- Gerard Schildberger 21:33, 28 October 2012 (UTC)
- I also interpreted that it is the generation of a string (that is a repetition of the input string some specified number of times) that is the goal. Printing the string in a loop would not be a correct solution, except for languages where doing output is effectively the same as producing an intermediate value (a small minority of languages). –Donal Fellows 10:30, 29 October 2012 (UTC)