Titan



float2str


This function converts a float value to a charstring. If the input is zero or its absolute value is between 10^-4 and 10^10 the decimal dot notation is used in the output with 6 digits in the fraction part. Otherwise the exponential notation is used with automatic (at most 6) digits precision in the mantissa.

(This is an additional predefined function, supported by TITAN.)


Related keyword:


float2str(float value) return charstring


Example 1:

   var bitstring myc := float2str(3.14); // variable myc will contain "3.140000"