Re: Bad syntax check

2019-01-04 Thread ToddAndMargo via perl6-users
On 1/3/19 1:52 AM, JJ Merelo wrote: El mié., 2 ene. 2019 a las 21:04, ToddAndMargo via perl6-users (mailto:perl6-us...@perl.org>>) escribió: Dear Perl 6 Developers, Fedora 29, x64 Xfce 4.13 $ perl6 -v      This is Rakudo version 2018.11 built on MoarVM version    

Re: Bad syntax check

2019-01-02 Thread ToddAndMargo via perl6-users
On 1/2/19 4:00 PM, Brad Gilbert wrote: You can only list one type as a return type. If there were a hypothetical Tuple type:     sub AddThree( Int $a, Int $b, Int $c --> Tuple[Str, Int] {         my Int $d = $a + $b + $c;         return Tuple[Str,Int].new( "a+b+c=", $d );     } I drew the

Re: Bad syntax check

2019-01-02 Thread Brad Gilbert
You can only list one type as a return type. If there were a hypothetical Tuple type: sub AddThree( Int $a, Int $b, Int $c --> Tuple[Str, Int] { my Int $d = $a + $b + $c; return Tuple[Str,Int].new( "a+b+c=", $d ); } my Int $X = 0; my Int $Y = 0; my Str $Z;

Re: Bad syntax check

2019-01-02 Thread ToddAndMargo via perl6-users
On 1/2/19 2:27 PM, ToddAndMargo via perl6-users wrote: On 1/2/19 2:11 PM, Simon Proctor wrote: Have you tried defining your return values in the signature? sub AddThree( Int $a, Int $b, Int $c --> Int) {...} With this the compiler knows what your function is supposed to return and can earn yo

Re: Bad syntax check

2019-01-02 Thread ToddAndMargo via perl6-users
On 1/2/19 2:11 PM, Simon Proctor wrote: Have you tried defining your return values in the signature? sub AddThree( Int $a, Int $b, Int $c --> Int) {...} With this the compiler knows what your function is supposed to return and can earn you in advance. I did and it blew up in my face so I sto

Re: Bad syntax check

2019-01-02 Thread Simon Proctor
Have you tried defining your return values in the signature? sub AddThree( Int $a, Int $b, Int $c --> Int) {...} With this the compiler knows what your function is supposed to return and can earn you in advance. On Wed, 2 Jan 2019, 20:04 ToddAndMargo via perl6-users Dear Perl 6 Developers, > >

Bad syntax check

2019-01-02 Thread ToddAndMargo via perl6-users
Dear Perl 6 Developers, Fedora 29, x64 Xfce 4.13 $ perl6 -v This is Rakudo version 2018.11 built on MoarVM version 2018.11 implementing Perl 6.d. I am constantly improving (changing things) in my subs, etc.. As such, the things I return often change. Because of this, I have a found so