Rosetta Code/Run examples: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Add some example output) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Better newline spacing) |
||
Line 371: | Line 371: | ||
my @cmd = %resource{$code}<cmd> ?? |%resource{$code}<cmd> !! "$exe $code.p6"; |
my @cmd = %resource{$code}<cmd> ?? |%resource{$code}<cmd> !! "$exe $code.p6"; |
||
for @cmd -> $cmd { |
for @cmd -> $cmd { |
||
say " |
say "\nCommand line: $cmd"; |
||
try EVAL(shell $cmd); |
try EVAL(shell $cmd); |
||
} |
} |
||
Line 393: | Line 393: | ||
Testing Determine_if_a_string_is_numeric |
Testing Determine_if_a_string_is_numeric |
||
⚫ | |||
⚫ | |||
Coerce Don't coerce |
Coerce Don't coerce |
||
String whitespace whitespace |
String whitespace whitespace |
||
Line 427: | Line 427: | ||
Testing Lucky_and_even_lucky_numbers |
Testing Lucky_and_even_lucky_numbers |
||
Command line: perl6 Lucky_and_even_lucky_numbers.p6 20 , lucky |
Command line: perl6 Lucky_and_even_lucky_numbers.p6 20 , lucky |
||
79 |
79 |
||
Command line: perl6 Lucky_and_even_lucky_numbers.p6 1 20 |
Command line: perl6 Lucky_and_even_lucky_numbers.p6 1 20 |
||
⚫ | |||
⚫ | |||
Command line: perl6 Lucky_and_even_lucky_numbers.p6 1 20 evenlucky |
Command line: perl6 Lucky_and_even_lucky_numbers.p6 1 20 evenlucky |
||
(2 4 6 10 12 18 20 22 26 34 36 42 44 50 52 54 58 68 70 76) |
(2 4 6 10 12 18 20 22 26 34 36 42 44 50 52 54 58 68 70 76) |
||
Command line: perl6 Lucky_and_even_lucky_numbers.p6 6000 -6100 |
Command line: perl6 Lucky_and_even_lucky_numbers.p6 6000 -6100 |
||
(6009 6019 6031 6049 6055 6061 6079 6093) |
(6009 6019 6031 6049 6055 6061 6079 6093) |
||
⚫ | |||
⚫ | |||
(6018 6020 6022 6026 6036 6038 6050 6058 6074 6090 6092) |
(6018 6020 6022 6026 6036 6038 6050 6058 6074 6090 6092) |