![]() |
Qore Programming Language Reference Manual 2.2.1
|
Functions | |
| RangeIterator | Qore::xrange (int start, int stop, int step=1, auto val) |
| Returns a RangeIterator containing an arithmetic progression of integers. | |
| RangeIterator | Qore::xrange (int stop) |
| Returns a RangeIterator containing an arithmetic progression of integers with start = 0 and step = 1. | |
RangeIterator helper functions allow to use RangeItartor in easier usage in loop statements.
| RangeIterator Qore::xrange | ( | int | start, |
| int | stop, | ||
| int | step = 1, | ||
| auto | val ) |
Returns a RangeIterator containing an arithmetic progression of integers.
| start | the initial value |
| stop | the final value |
| step | the step; the default is 1; must be greater than 0; the function throws a RANGE-ERROR exception when this argument is < 1 |
| val | an optional value to be returned instead of the default integer value |
| Returns | a RangeIterator containing an arithmetic progression of integers. |
| RANGEITERATOR-ERROR | this exception is thrown if step < 1 |
| RangeIterator Qore::xrange | ( | int | stop | ) |
Returns a RangeIterator containing an arithmetic progression of integers with start = 0 and step = 1.
This is an overloaded version of xrange(int, int, int) meaning xrange(0, stop, 1)
| stop | the final value |
| Returns | a RangeIterator containing an arithmetic progression of integers with start = 0 and step = 1. |