User Tools

Site Tools

한국어

cubloc:fp:index

FP (value, wholeNumberDigits, fractionalNumberDigits)

FP converts floating point variables into a formatted string with user defined whole and fractional number of digits.

Dim A as Single
A = 3.14
Debug Float A     ' 3.1400000 Prints all digits.
Debug FP(A,3,2)   ' 3.14 Print user defined digits.

With the FP function, the user can control the number of digits to be used for string data when using Debug or displaying to an LCD.

Cubloc floating-point values are stored in accordance to the IEEE 754 format. The output of FP and Float may differ but the value stored in the variable will be the same.

See also Float, DP, and HP

Go CUBLOC home

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