Click or drag to resize

SetScience Function

X#
Return and optionally change the setting that displays numbers in scientific notation.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SetScience() AS LOGIC
Request Example View Source

Return Value

Type: Logic
If lNewSetting is not specified, SetScience() returns the current setting.
If lNewSetting is specified, the previous setting is returned.
Remarks
SetScience() is an environment function that allows you to display numbers in scientific notation.
Any number can be shown in scientific notation where a number is represented by a mantissa (its whole digits) multiplied by 10 raised to the power of an exponent.
Examples
This example uses SetScience() to show numbers in scientific notation:
X#
1FUNCTION Start()
2    LOCAL lSNSetting AS LOGIC
3    lSNSetting := SetScience(TRUE)
4    ? 1234567890
5    ? 12345.678
6    SetScience(lSNSetting)
See Also