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

int and Str in sub declaration question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
January 9, 2020 02:58
Subject:
int and Str in sub declaration question
Message ID:
3b80b98f-9757-f342-c675-9692817baa18@zoho.com
Hi All,

In a sub declaration, is there a way to constrain
a variable to only an "int32" or a "Str" (I want both)?
Or do I have to put up with the other types of "Any"?

Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About