develooper Front page | perl.perl6.users | Postings from January 2019

Re: Bad syntax check

Thread Previous | Thread Next
ToddAndMargo via perl6-users
January 2, 2019 22:27
Re: Bad syntax check
Message ID:
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 stopped doing it.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About