FormatRealToString
Creates a string from a real number using a proper format.
Applications:Useful for preparing a number for display or communication with specific number of fractional digits, sign etc.
Syntax
C++
Python
def FormatRealToString( inReal: float, /, *, inIntegerDigitCount: int = 0, inFractionalDigitCount: int = 3, inDecimalMark: str = "\".\"", inTrailingCharacter: str = "\"0\"", inForceSignPrinting: bool = False, inSuffix: str = "\"\"" ) -> outString: str
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inReal | float | Input real | ||
![]() |
inIntegerDigitCount | int | 0 - 1000 | 0 | How many characters the integer part of the input real should have at least |
![]() |
inFractionalDigitCount | int | 0 - 100 | 3 | How many characters the fractional part of the input real should have |
![]() |
inDecimalMark | str | "\".\"" | The symbol used to separate the integer part from the fractional part of the number | |
![]() |
inTrailingCharacter | str | "\"0\"" | Defines the trailing character | |
![]() |
inForceSignPrinting | bool | False | Forces printing the sign of the number even if the number is positive | |
![]() |
inSuffix | str | "\"\"" | Defines a suffix. Generally it is an unit of value (e.g. mm) | |
![]() |
outString | str | Output string |


