SetFixed Function (Logic) | |
Return and optionally change the setting that fixes the number of decimal digits used to display numbers.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION SetFixed(
lNewSetting AS LOGIC
) AS LOGIC
public static bool SetFixed(
bool lNewSetting
)
Request Example
View SourceParameters
- lNewSetting
- Type: Logic
TRUE displays numeric output using the current SetDecimal() setting. FALSE ignores SetDecimal(), allowing the operation or function to determine the number of decimal places to display, according to the default rules for numeric display.
Return Value
Type:
Logic
If
lNewSetting is not specified, SetDecimal() returns the current setting.
If
lNewSetting is specified, the previous setting is returned.
Remarks Tip |
---|
SetFixed() affects only the display format of numbers, not the actual numeric precision of calculations.
|
Examples
This example uses SetFixed() to start fixing the number of decimal digits displayed at the beginning of a routine and stop fixing it at the end of the routine:
1LOCAL lSFSetting AS LOGIC
2lSFSetting := SetFixed(TRUE)
3MyFunc()
4SetFixed(lSFSetting)
See Also