Jump to content

Idiomatically determine all the characters that can be used for symbols: Difference between revisions

→‎{{header|Perl 6}}: mention that typical identifers are, well, typical
(→‎{{header|Perl 6}}: mention that typical identifers are, well, typical)
Line 18:
 
=={{header|Perl 6}}==
Any Unicode character or combination of characters can be used for symbols in Perl 6. hereHere's some counting rods and some cuneiform:
<lang perl6>sub postfix:<𒋦>($n) { say "$n trilobites" }
 
Line 26:
{{out}}
<pre>8 trilobites</pre>
Of course, as in other languages, most of the characters you'll typically see in names are going to be alphanumerics from ASCII (or maybe Unicode), but that's a convention, not a limitation, due to the syntactic category notation demonstrated above, which can introduce any sequence of characters as a term or operator.
 
=={{header|Python}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.