range

Create an Array containing a range of elements.


Syntax


Parameters

  • Mixed from - The value to start the sequence on.
    • Number - The sequence will start on the Number given.
    • String - The sequence will start on the String given, using the first character only.
  • Mixed to - The value to end the sequence on.
    • Number - The sequence will end on the Number given.
    • String - The sequence will end on the String given, using the first character only.
  • Number step - The positive integer increment between elements in the sequence. If omitted, it defaults to 1.


Result

  • Array - The range of values.

Returns an Array of values in sequence from from to to.

If a default step increment is satisfactory, the Range Operator (...) can be used.

ptpscript/functions/range.txt · Last modified: 2007/01/24 10:15
 
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki