Please enable JavaScript to view this site.

Function that converts an expression of real type to its equivalent ascii representation.

Sign and decimal point are treated appropriately.

Syntax

string str_r (real value, i32 minLen, i32 nDec)

value

Value to be converted

minLen

Minimum length of the returned string.

This is typically a number, but can also be an expression. If the number of characters representing the string is less than minLen, it will be initialized with an appropriate number of space characters. In the case that minLen is not sufficient to represent the number, the string will contain a number of characters greater than minLen, that is, the characters strictly necessary to represent the number value.

No error signaling occurs.

With minLen = 0, the floating-point format is activated

nDec

Represents the desired number of decimal digits

Result

Returns the ascii equivalent representation of the value number

Validity

Rule, Task

Note

In floating-point format, non-significant zeros and spaces are not added to the string. Thus the length of the string can vary between 1 and (nDec + 2).

The minLen and nDec parameters must be specified.

If minLen = 0, a minimum string length of 10 is assumed

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC