Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
29
bitchx-docs/6_Functions/jot
Normal file
29
bitchx-docs/6_Functions/jot
Normal file
@@ -0,0 +1,29 @@
|
||||
Synopsis:
|
||||
$jot(<start> <stop>)
|
||||
|
||||
Technical:
|
||||
This script is used to obtain a series of integers, from the first input
|
||||
to the second. Negative numbers are permitted, and the series may be
|
||||
ascending or descending.
|
||||
|
||||
Practical:
|
||||
This function is used to generate a number range. One popular use for
|
||||
this is in conjunction with $chr(), allowing a range of ascii characters
|
||||
to be returned (which then might be stripped from another string, etc.).
|
||||
|
||||
Returns:
|
||||
* number range from start to stop
|
||||
* if less than 2 arguments, empty string
|
||||
* if more than 2 arguments, first argument
|
||||
* if non-digits entered, 0 (zero)
|
||||
|
||||
Examples:
|
||||
$jot(2 6) returns "2 3 4 5 6"
|
||||
$jot(3 -2) returns "3 2 1 0 -1 -2"
|
||||
$jot(4) returns "" (empty string)
|
||||
$jot(4 6 8) returns "4"
|
||||
$jot(a 4) returns "0"
|
||||
|
||||
See Also:
|
||||
chr(6); isdigit(6)
|
||||
|
||||
Reference in New Issue
Block a user