Function prototype: Difference between revisions

Content deleted Content added
Added zkl
Line 439: Line 439:


<lang perl>sub noargs(); # Declare a function with no arguments
<lang perl>sub noargs(); # Declare a function with no arguments
sub twoargs($$); # Declare a function with two scalar arguments. The two sigils act as argument type placeholders</lang>
sub twoargs($$); # Declare a function with two scalar arguments. The two sigils act as argument type placeholders
sub noargs :prototype(); # Using the :attribute syntax instead
sub twoargs :prototype($$);</lang>


=={{header|Perl 6}}==
=={{header|Perl 6}}==