Ellipsis (computer programming): Difference between revisions

Content deleted Content added
Ranges: Add Kotlin to the list of example languages
Moved a Raku usage to correct section and put in it's own paragraph
Line 11:
In Rust the <code>..=</code> operator denotes an inclusive range for cases in matches and the <code>..</code> operator represents a range not including the end value.
 
Perl and Ruby [[Operator overloading|overload]] the ".." operator in scalar context as a [[flip-flop operator]] - 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 Raku an actual [[Unicode]] (U+2026) ellipsis (…) character is used to serve as a type of marker in a 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 -->] {{Webarchive|url=https://web.archive.org/web/20110615080653/http://dev.perl.org/perl6/doc/design/exe/E07.html#And_mark_what_way_I_make... |date=2011-06-15 }}{{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:
Line 104:
semantically equivalent to the single line
:<code>x = [ 1 2 3 4 5 6 ];</code>
 
In Raku an actual [[Unicode]] (U+2026) ellipsis (…) character is used to serve as a type of marker in a 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 -->] {{Webarchive|url=https://web.archive.org/web/20110615080653/http://dev.perl.org/perl6/doc/design/exe/E07.html#And_mark_what_way_I_make... |date=2011-06-15 }}{{Self-published inline|date=January 2011}}</ref>
 
==References==