![]() |
|
format_seq |
Longname: | format_seq uence | ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Released: | 7.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | 7.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also: | stream perl hash format_num Technote: 0080 |
Summary |
A keyword used with function variables: ^[funcname parameter(s)]. This syntax can be used anywhere that a regular 3B2 variable can be used: in show strings, in scripts, in expressions, etc. Function variables are a V8 feature that uniforms variable use and functions into a readable syntax. The 'format_seq' function, similar to format_num, but takes a positive integer and converts it into a sequence specified by a format pattern. The number to be formatted, pattern is the sequence to use when formatting the number, and separator and size are optional parameters for determining the separation of digits in the output. If the grouping separator and grouping size are not specified they default to a separator of ’,’and a size of 3. |
Example extract |
The following show string will display the current value of the th command (text height).
|
Syntax
|
num:s pattern:s separator:s size:s
]?
|
num:s |
The number to be formatted. |
pattern:s |
Pattern is the sequence to use when formatting the number.
|
separator:s |
Optional parameter for determining the separation of digits in the output. |
size:s |
Optional parameter for determining the separation of digits in the output. |
Example |
will output "L"
will output "ad"
will output "XIV"
will output "12,345"
will output "012,345"
will output "1 23 45"
will output "m-c-m-l-x-x-x-i-v" |
Document created on 22-Nov-2004 (revision 1)