Ellipsis (computer programming): Difference between revisions

Content deleted Content added
Gedge67 (talk | contribs)
m adding refs for the perl/perl6 operator
Line 1:
{{refimprove|date=September 2014}}
In [[computer programming]], '''ellipsis''' notation (.. or ...) is used to denote [[range (computer programming)|ranges]], an unspecified number of arguments, or a parent directory. Most programming languages other than [[Perl6Raku (programming language)|Raku]] require the [[ellipsis]] to be written as a series of periods; a single ([[Unicode]]) ellipsis character cannot be used.
 
== Ranges ==
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 Perl6Raku 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 -->]{{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 36:
 
== Incomplete code ==
In Perl<ref>https://perldoc.perl.org/perlsyn.html#The-Ellipsis-Statement</ref> and [[Perl6Raku]]<ref>https://doc.perl6.org/language/operators#listop_...</ref> the 3-character ellipsis is also known as the "yada yada yada" operator and, similarly to its [[linguistic meaning]], serves as a "stand-in" for code to be inserted later.
 
[[Python3]] also allows the 3-character ellipsis to be used as an expressive place-holder for code to be inserted later.