208
Platforms
©2000-2008 Tibbo Technology Inc.
See Also:
---
Part
Description
len
Length of the string to generate
substr
Substring that will be used (repeatedly) to generate the
string
Details
Notice that len parameter specifies total resulting string length in bytes so the last
substring will be truncated if necessary to achieve exact required length. This
function is an expanded version of the STRING$ function commonly found in other
BASICs.
Examples
string1 = strgen(
10
,
"ABC"
)
' result will be 'ABCABCABCA'.
Stri Function
Function:
Converts signed 16-bit numeric value (short) into its
decimal string representation.
Syntax:
stri(num as integer) as string
See Also:
,
,
,
,
,
,
Part
Description
num
Value to be converted to string.
Details
Can be invoked implicitly, through the string_var= short_var expression (see
example below). Compiler is smart enough to pre-calculate constant-only
expressions involving implicit use of stri function.
Examples
dim
sh
as
short
dim
s
as
string
sh= -3400
s = stri(sh)
'explicit invocation.
s = sh
'implicit invocation
s = stri(-100)
'will be calculated at compilation -- no actual stri
function invokation will be here
207
199
200
190
197
195
199
210
200