195
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
dim
r1
as
real
dim
s
as
string
'demonstrate output formats
r1=10000000000.0
'notice '.0' -- it is necessary or compilier will
generate an error
s=ftostr(r1,FTOSTR_MODE_ME,11)
'result will be '1E+010'
s=ftostr(r1,FTOSTR_MODE_PLAIN,11)
'result will be '10000000000'
s=ftostr(r1,FTOSTR_MODE_AUTO,11)
'result will be '1E+010' because this
representation is more
compact
'demonstrate rounding
r1=1234567.125
s=ftostr(r1,FTOSTR_MODE_AUTO,15)
'result will be '1234567.125'
s=ftostr(r1,FTOSTR_MODE_AUTO,9)
'result will be '1234567.13'
s=ftostr(r1,FTOSTR_MODE_AUTO,2)
'result will be '1200000'
s=r1
'fstr will be used, result will be '1234567.125'
Hex Function
Function:
Converts unsigned 16-bit numeric value (word) into its
HEX string representation.
Syntax:
hex(num as integer) as string
See Also:
,
,
,
,
,
Part
Description
num
Value to convert.
Details
Standard "&h" prefix is added at the beginning of the string.
Examples
dim
s
as
string
s = hex(34)
'result will be '&h22'
Hours Function
Function:
Returns the hours value for a given minutes number.
Syntax:
hours (mincount as word) as byte
Returns:
Hours in the 0-23 range.
See Also:
,
,
207
199
208
200
190
197
199
210
200
211
204
191
211
192
203
203