2 ms·
There is the down-to pseudo-operator --> as in int x = 3; while(x --> 0) { std::cout<<x<<"\n"; }
by im3w1l 11y ago
There is the down-to pseudo-operator --> as in
int x = 3;
while(x --> 0) {
std::cout<<x<<"\n";
}
- repsilat 11y agoIn addition to the rightward arrow, there's the leftward arrow: int x = 3; while(n <-- x) { cout << x << endl; } which is different because it doesn't include the lower bound `n`. And of course, if typing the ">" is too taxing, the "---" operator is equivalent to the "-->" operator: int x = 3; while(x --- n) { cout << x << endl; } A few more goodies in this style at http://steike.com/code/useless/evil-c/ http://steike.com/code/useless/evil-c/ (home of the zip-quine.)