1.2.14Class Range

Metaclass for Falcon range type.

Class Range from \
                 BOM( )

This class holds the methods that can be applied to Falcon range items. Ranges are created through the [:] operator, like this:

         r1 = [1:10]          // 1 to 10
         r2 = [-1:0]          // reverse sequence
         r3 = [0:10:2]        // stepping range

         > "Hello world"[r2]  // reverses the string
timesrepeats a sequence a given number of times.
Methods inherited from class BOM
__addOverrides binary addition operand.
__callOverrides call operator "self()".
__decOverrides decrement unary prefix operand.
__decpostOverrides decrement unary postfix operand.
__divOverrides binary division operand.
__getIndexOverrides array access operator []
__incOverrides increment unary prefix operand.
__incpostOverrides increment unary postifx operand.
__modOverrides modulo operand.
__mulOverrides binary multiplication operand.
__powOverrides power operand.
__setIndexOverrides array write operator []
__subOverrides binary subtraction operand.
baseClassReturns the class item from which an object has been instantiated.
boundDetermines if an item is bound or not.
classNameReturns the name of the class an instance is instantiated from.
clonePerforms a deep copy of the item.
comparePerforms a lexicographical comparison.
derivedFromChecks if this item has a given parent.
describeReturns the deep contents of an item on a string representation.
isCallableDetermines if an item is callable.
lenRetrieves the length of a collection
metaclassReturns the metaclass associated with this item.
ptrReturns a raw memory pointer out of this data (as an integer).
serializeSerialize the item on a stream for persistent storage.
toStringCoverts the object to string.
typeIdReturns an integer indicating the type of this item.



repeats a sequence a given number of times.

Range.times( sequence )
sequence Function or sequence to be repeated.
ReturnLast index processed.

This method works exactly as the times function when the first parameter is a range.

See also: times.

Made with http://www.falconpl.org