SetDigitFixed Function (Logic) | |
Return and optionally change the setting that fixes the number of digits used to display numeric output.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION SetDigitFixed(
lNewSetting AS LOGIC
) AS LOGIC
public static bool SetDigitFixed(
bool lNewSetting
)
Request Example
View SourceParameters
- lNewSetting
- Type: Logic
TRUE fixes the number of digits displayed. FALSE leaves the number of digits displayed unfixed.
The initial default is FALSE.
Return Value
Type:
Logic
If
lNewSetting is not specified, SetDigitFixed() returns the current setting.
If
lNewSetting is specified, the previous setting is returned.
Remarks
SetDigit() and SetDigitFixed() can be used together to control the way digits are displayed:
When SetDigitFixed() is TRUE, display of numeric output is fixed according to the SetDigit() value.
When SetDigitFixed() is FALSE, numeric output displays according to the default rules for numeric display.
Tip |
---|
SetDigitFixed() affects only the display format of numbers, not the actual numeric precision of calculations.
|
Examples
This example uses SetDigitFixed() to start fixing the number of digits displayed at the beginning of a routine and stop fixing them at the end of the routine:
1LOCAL lSDFSetting AS LOGIC
2lSDFSetting := SetDigitFixed(TRUE)
3MyFunc()
4SetDigitFixed(lSDFSetting)
See Also