Re: restricted value passed to a sub question

2019-12-07 Thread ToddAndMargo via perl6-users
On 2019-12-04 00:40, ToddAndMargo via perl6-users wrote: Hi All, I am cooking up something where I want top pass a value to a sub, but I want to restrict what those values are. For instance, things like    AbortRetryIgnore    CancelRetryContinue    Help    YesNo    Maybe And so on and

Re: restricted value passed to a sub question

2019-12-05 Thread ToddAndMargo via perl6-users
On 2019-12-05 03:25, William Michels via perl6-users wrote: If you want to view a publisher-authorized preview of brian d foy's "Learning Perl 6" book, here's a good place to start (there's also a link to purchase an eBook): https://books.google.com/books?id=sbRqDwAAQBAJ Todd, you could try sea

Re: restricted value passed to a sub question

2019-12-05 Thread William Michels via perl6-users
If you want to view a publisher-authorized preview of brian d foy's "Learning Perl 6" book, here's a good place to start (there's also a link to purchase an eBook): https://books.google.com/books?id=sbRqDwAAQBAJ Todd, you could try searching in the search box for: "Checking Allowed Values". HTH,

Re: restricted value passed to a sub question

2019-12-04 Thread ToddAndMargo via perl6-users
On 2019-12-04 04:25, Mark Senn wrote: I can't have books in my house. It is along story. If you can have ebooks a Google search showed https://www.amazon.com/Learning-Perl-Keeping-Impossible-Within-ebook-dp-B07GT9KPP1/dp/B07GT9KPP1/ref=mt_kindle?_encoding=UTF8&me=&qid= for Kindle versions or

Re: restricted value passed to a sub question

2019-12-04 Thread ToddAndMargo via perl6-users
El mié., 4 dic. 2019 a las 11:06, ToddAndMargo via perl6-users https://docs.perl6.org/type/Map.html On 2019-12-04 02:12, JJ Merelo wrote:  Please use this now: https://docs.raku.org/type/Map.html (also, we should probably move the deprecation notice from the footer to the header.

Re: restricted value passed to a sub question

2019-12-04 Thread JJ Merelo
El mié., 4 dic. 2019 a las 11:06, ToddAndMargo via perl6-users (< perl6-users@perl.org>) escribió: > On 2019-12-04 01:44, William Michels via perl6-users wrote: > > Hi Todd, > > > > Chapter 9 (Associatives) of "Learning Perl 6" by brian d foy has a > > section on Maps, "the immutable mapping of ze

Re: restricted value passed to a sub question

2019-12-04 Thread ToddAndMargo via perl6-users
On Wed, 4 Dec 2019 at 08:45, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, I am cooking up something where I want top pass a value to a sub, but I want to restrict what those values are. For instance, things like AbortRetryIgnore C

Re: restricted value passed to a sub question

2019-12-04 Thread ToddAndMargo via perl6-users
On 2019-12-04 01:44, William Michels via perl6-users wrote: Hi Todd, Chapter 9 (Associatives) of "Learning Perl 6" by brian d foy has a section on Maps, "the immutable mapping of zero or more keys to values". In that section there are subsections entitled 'Checking Keys', 'Creating from a Positi

Re: restricted value passed to a sub question

2019-12-04 Thread William Michels via perl6-users
Hi Todd, Chapter 9 (Associatives) of "Learning Perl 6" by brian d foy has a section on Maps, "the immutable mapping of zero or more keys to values". In that section there are subsections entitled 'Checking Keys', 'Creating from a Positional' and 'Checking Allowed Values.' HTH, Bill. On Wed, Dec

Re: restricted value passed to a sub question

2019-12-04 Thread Simon Proctor
So I'd approach this in one of two ways. Firstly there's the multi sub with constants option : multi selector( "AbortRetryIgnore" ) { ... } multi selector( "CancelRetryContinue" ) { ... } multi selector( "Help" ) { ... } multi selector( "YesNo" ) { ... } multi selector( "Maybe" ) { ... } I'd do t

restricted value passed to a sub question

2019-12-04 Thread ToddAndMargo via perl6-users
Hi All, I am cooking up something where I want top pass a value to a sub, but I want to restrict what those values are. For instance, things like AbortRetryIgnore CancelRetryContinue Help YesNo Maybe And so on and so forth. If the wrong value is passed, I want the checker to