User Tools

Site Tools

한국어

cubloc:float:index

Float

Use Float to convert floating point values to a String.

Dim F1 As Single
F1 = 3.14
 
Debug Float F1,cr      ' Print "3.14000".
 
Dim ST As String * 15
ST = Float F1          ' First store in a String.
ST = Left(ST,3)        ' Convert to 3 decimal places
Debug ST               ' Print "3.14".

You can also store a value in String before printing with Debug statements or displaying to the LCD as shown below.

See also FP

Go CUBLOC home

cubloc/float/index.txt · Last modified: 2016/06/22 10:52 by COMFILE Technology