Re: printf question

2020-02-09 Thread Paul Procacci
Named parameters must come after all positional parameters. Your example subroutine is invalid for this reason, while the following would be fine: sub abcdefg( $b, $f, $g, :$a, :$c, :$e) abcdefg("position1", "position2", "position3", :e("named_e"), :a("named_a"), :c("named_c")); On Sun, Feb 9,

Re: printf question

2020-02-09 Thread ToddAndMargo via perl6-users
On 2020-02-09 14:53, Paul Procacci wrote: subchdir(IO() $path, :$d=True, :$r, :$w, :$x-->IO::Path:D) Hi Paul, What I wanted to see is how something liek sub abcdefg( :$a, $b, :$c, :$e, $f, $g ) would be called -T

Re: printf question

2020-02-09 Thread Paul Procacci
I think it's best that I show you examples from the official documentation. Let's use chdir as our example. https://docs.raku.org/routine/chdir chdir has the following signature: sub chdir(IO() $path, :$d = True, :$r, :$w, :$x --> IO::Path:D) So let's break this down. $path :: This is a posit

Re: printf question

2020-02-09 Thread ToddAndMargo via perl6-users
On 2020-02-08 15:39, Paul Procacci wrote: sub a(:$a, :$b, :$c) {} a(:c(1), :a(0), :b(3)); Hi Paul, I think I got it, but would yo give me one more exampale to make sure I fully understand? sub a(:$a, :$b, :$c) {} a(:c(1), :a(0), :b(3)); But with two that are not named and two that are name