'---------------------------------------------------------------------
'                            FUSING.BAS
'                      (c) 2000-2003 MCS ELectronics
'---------------------------------------------------------------------

Dim S As Single , Z As String * 10

'now assign a value to the single
S = 123.45678
'when using str() you can convert a numeric value into a string
Z = Str(s)
Print Z                                                     'prints 123.456779477

Z = Fusing(s , "#.##")

'now use some formatting with 2 digits behind the decimal point with rounding
Print Fusing(s , "#.##")                                    'prints 123.46

'now use some formatting with 2 digits behind the decimal point without rounding
Print Fusing(s , "#.&&")                                    'prints 123.45

'The mask must start with #.
'It must have at least one # or & after the point.
'You may not mix & and # after the point.
End