Sign(Value: Double): Integer;
Sign(Value: double): integer;
Value. Real number.
The Sign method returns the sign of a real number.
Parameter value cannot be empty.
It can return the following values:
1 - if a number is positive.
0 - if a number is equal to 0.
-1 - if a number is negative.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Double;
Begin
r := Math.Sign(10);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the sign of the set number 1.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.MathFin;
…
Public Shared Sub Main(Params: StartParams);
Var
r: Double;
Math: MathClass = New MathClass();
Begin
r := Math.Sign(10);
System.Diagnostics.Debug.WriteLine(r);
End Sub;
See also: