Talk:Input/Output for lines of text

From Rosetta Code
Revision as of 00:45, 25 November 2021 by Mr Dalien (talk | contribs)

Perl 6

Do we have to be explicit about $*IN and $*OUT? What about just:

<lang perl6>say get() xx get;</lang>

?--Grondilu (talk) 06:51, 9 January 2014 (UTC)

But it was saying that you have to call an intermediate method, so I took it very literally as "method" rather than function. I also took it very literally that it didn't specify that you call a user-defined method. So I called a helper method already predefined on the handle. :-) --TimToady (talk) 05:36, 10 January 2014 (UTC)

Task needs clarification

What is "passing it to a method as an intermediate step" supposed to mean?
(See also the discussion section above this one, which demonstrates how that sentence can be ambiguous/confusing.) --Smls (talk) 21:53, 13 August 2016 (UTC)

This is an old one, but I agree. Maybe the task should be read an integer, read that many lines, then output those lines? That way it is just an simple task to show IO.Garbanzo (talk) 06:11, 29 August 2021 (UTC)

Quizá se trate de algo trivial

Cuando el enunciado señala que la entrada se realiza a través del STDIN, y la salida, por el STDOUT, debería ocurrir algo como esto?:

$ echo 3 | my_program
$ echo "Hello" | my_program
Hello
$ echo "hello world" | my_program
hello world
$ echo "Pack my Box with 5 dozen liquor jugs" | my_program
Pack my Box with 5 dozen liquor jugs
$ echo "otra cosa" | my_program
warning: I need the number of lines to enter!