Content deleted Content added
Salix alba (talk | contribs) →Range as a operator: F# Kotlin |
Salix alba (talk | contribs) →Range as a operator: Perl |
||
Line 88:
// Outputs: [1; 2; 3; 4]
</syntaxhighlight>
<syntaxhighlight lang="Kotlin">
for (i in 1..5) print(i)
</syntaxhighlight>
and [[Perl]].<ref>{{cite web|access-date=2025-02-22|title=perlop - Perl expressions: operators, precedence, string literals - Perldoc Browser|url=https://perldoc.perl.org/perlop#Range-Operators|website=perldoc.perl.org}}</ref>
<syntaxhighlight lang="Perl">
for (i in 1..5) print(i)
</syntaxhighlight>
[[Python (programming language)|Python]] and [[PHP (programming language)|PHP]] does not have any range operator but they do have a {{Code|range}} function.<ref>{{cite web |title=Built-in Functions |url=https://docs.python.org/3/library/functions.html#func-range |website=Python documentation |publisher=Python Software Foundation |access-date=17 December 2024 |language=en}}</ref><ref>{{cite web |title=PHP: range - Manual |url=https://www.php.net/manual/en/function.range.php |publisher=The PHP Documentation Group |access-date=17 December 2024}}</ref>
|