Content deleted Content added
m Tagging using AWB (10458) |
→Ranges: ".." in perl - some details |
||
Line 10:
In Ruby, the <code>...</code> operator denotes a half-open range, i.e. that includes the start value but not the end value.
Perl [[Operator overloading|overloads]] the ".." operator in scalar context as a [[stateful]] [[bistability|bistable]] [[Boolean datatype|Boolean]] test, roughly equivalent to "true while ''x'' but not yet ''y''", similarly to the "," operator in [[Sed (programming language)|sed]] and [[AWK programming language|AWK]].<ref>[http://perldoc.perl.org/perlop.html#Range-Operators-operator%2c-range-range-..-... perlop - perldoc.perl.org<!-- Bot generated title -->]</ref> In [[Perl6]], the 3-character ellipsis is also known as the "yadda yadda yadda" operator and, similarly to its [[linguistic meaning]], serves as a "stand-in" for code to be inserted later. In addition, an actual [[Unicode]] ellipsis character is used to serve as a type of marker in a perl6 format string.<ref>[http://dev.perl.org/perl6/doc/design/exe/E07.html#And_mark_what_way_I_make... Exegesis 7: Formats - perl6<!-- Bot generated title -->]{{Self-published inline|date=January 2011}}</ref>
The [[GNU Compiler Collection]] has an extension to the C and C++ language to allow ''case ranges'' in [[switch statement]]s:
|