Click or drag to resize

SetFixed Function (Logic)

X#
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.21
Syntax
 FUNCTION SetFixed(
	lNewSetting AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

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 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:
X#
1LOCAL lSFSetting AS LOGIC
2lSFSetting := SetFixed(TRUE)
3MyFunc()
4SetFixed(lSFSetting)
See Also