Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users

On 12/7/22 02:02, ToddAndMargo via perl6-users wrote:

On my sub declarations, I like to use "export"


I had been doing a lot of module coding.

I should have said "returns", not "export[s]"



--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~



Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users

On 12/7/22 02:02, ToddAndMargo via perl6-users wrote:

use "export"


"exports", I forgot the "s"


--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~



"returns" question

2022-12-07 Thread ToddAndMargo via perl6-users

Hi All,

On my sub declarations, I like to use "export"

sub abc() returns Str {...}

becasue it makes eh sub easier to figure out at
a glance when I go to maintain it.

Two exports I have not figured out are
   1) an array,
   2) an object created from a custom class.

returns @

gets the finger wagged at me.

What is the proper syntax for these two?


Many thanks,
-T


--

Yesterday it worked.
Today it is not working.
Windows is like that.