In Signature§
See primary documentation in context for method count
method count(Signature: --> Real)
Returns the maximal number of positional arguments which can be bound to the signature. Returns Inf
if there is a slurpy positional parameter.
In ForeignCode§
See primary documentation in context for method count
method count()
Returns the number of arguments the enclosed code needs.
In Code§
See primary documentation in context for method count
method count(Code: --> Real)
Returns the maximum number of positional arguments that may be passed when calling the code object. For code objects that can accept any number of positional arguments (that is, they have a slurpy parameter), count
will return Inf
. Named parameters do not contribute.
sub argless()sub args(, ?)sub slurpy(, , *)say .count; # OUTPUT: «0»say .count; # OUTPUT: «2»say .count; # OUTPUT: «Inf»
In Format§
See primary documentation in context for method count
method count(--> List)
Returns the maximal number of positional arguments that is needed for this format. Intended for introspection purposes.
use v6.e.PREVIEW;my = Format.new("%05d%3x:%s");say .count; # OUTPUT: «3»