Hi All,
Why does this work
$ p6 'sub RtnOrd( Str $Char --> Int ){return ord($Char)}; say
RtnOrd "A";'
65
But this does not?
$ p6 'sub RtnOrd( Str $Char --> Str, Int ){return $Char,
ord($Char)}; say RtnOrd "A";'
===SORRY!=== Error while compiling -e
Malformed return value (return constraints only allowed at the end
of the signature)
at -e:1
------> sub RtnOrd( Str $Char --> Str⏏, Int ){return $Char,
ord($Char)}; say R
Many thanks,
-T
No pointy:
$ p6 'sub RtnOrd( Str $Char ){return $Char, ord($Char)}; say RtnOrd "A";'
(A 65)