📄 fusing.bas
字号:
'---------------------------------------------------------------------
' FUSING.BAS
'---------------------------------------------------------------------
Dim S As Single , Targ As Xram String * 16
'The FUSING() function formats a single into a string in order to represent
'it better without all the digits after the point
'assign single
S = 99.4999
Targ = Fusing(s , ##.#)
Print Targ
'with the # mask, you can provide the number of digits before and after the point
'the result should be 99.5
'with a 0 before the pint, you can indicate how many digits you want to have filled
'with zeros
Targ = Fusing(s , 000.#)
'the result should be 099.5
'When you dont want that the result is rounded, you can use the & indicator
Targ = Fusing(s , 000.&&)
'result should be 099.49
'note that if the number of digits you provide is not enough to store the result,
'the result is extended automaticly
'Also note that the - sign will use one digit of the mask too
S = -99.12
Targ = Fusing(s , 00.&&)
'result is -99.12
End
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -