Fill PowerScript function
Description
Builds a string of the specified length by repeating the specified
characters until the result string is long enough.
Syntax
|
1 |
<span>Fill</span> ( <span>chars</span>, <span>n</span> ) |
|
Argument |
Description |
|---|---|
|
chars |
A string whose value will be repeated |
|
n |
A long whose value is the length of the |
Return Values
String. Returns a string n characters
long filled with the characters in the argument chars.
If the argument chars has more than n characters,
the first n characters of chars are
used to fill the return string. If the argument chars has fewer
than n characters, the characters in chars are
repeated until the return string has n characters.
If any argument’s value is null, Fill returns null.
Usage
Use Fill in printing routines to create
a line or other special effect. For example, you can fill the amount
line of a check with asterisks, or simulate a total line in a screen
display by repeating hyphens below a column of figures.
Examples
This statement returns a string whose value is 35
stars:
|
1 |
<span>Fill</span>("*", 35) |
This statement returns the string -+-+-+-:
|
1 |
<span>Fill</span>("-+", 7) |
This statement returns 10 tildes (~):
|
1 |
<span>Fill</span>("~", 10) |
See Also
-
Fill method for DataWindows in
the DataWindow Reference or online Help