MAINSAIL Language Manual, Section 33.41

previous   next   top   contents   index   framed top   this page unframed


33.41. $dup

Figure 33–41. $dup
$ALWAYSINLINE COMPILETIME
STRING
PROCEDURE   $dup        (STRING s;
                         
INTEGER n;
                         
OPTIONAL POINTER($areaarea);

$dup returns s concatenated with itself n times (if new text is generated, the new text is placed in area if area is specified; see Section 29.4). For example:

$dup("-",50)

returns a STRING of 50 dashes. fldWrite may be used to pad a STRING to a specified length; see Section 35.12.

If s and n are constants, and area is omitted, $dup is computed at compiletime.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 33.41