SalNumber
Namespace: PPJ.Runtime
Assembly: PPJ.Runtime.49 (4.9.0.0)
SAL Number basic type. It wraps .NET native Decimal type. SalNumber objects are automatically cast to and from SalBoolean, Decimal, and int.
- C#
- VB.NET
public struct SalNumber : ValueType, IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable
Public Structure SalNumber
Implements ValueType, IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable
Constructors
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Decimal |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Double |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Single |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Int32 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | UInt32 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Int64 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | UInt64 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Int16 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | UInt16 |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Char |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Byte |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Boolean |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | Enum |
SalNumber(x)
Creates a new SalNumber.
| Name | Type | Description |
|---|---|---|
| x | IntPtr |
Properties
IsNull
Boolean: Checks if this SalNumber object contain a null value.
Value
Decimal: Returns the inner decimal value
Methods
Abs()
Computes a number's absolute value.
Returns: SalNumber. nNum
Add(x, y)
- operators for adding two SalNumber objects
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | |
| y | SalNumber |
Returns: SalNumber.
ArcCos()
Computes the arc cosine of a value in the range 0 to 1. The value's domain is -1 to 1.
Returns: SalNumber. nArcCos
ArcSin()
Computes a value's arc sine. The value's domain is -1 to 1.
Returns: SalNumber. nArcSin
ArcTan()
Computes a value's arc tangent.
Returns: SalNumber. nArcTan
ArcTan2(nm_valueY, nm_valueX)
Computes the arc tangent of two values. This function uses the signs of both parameters to determine the quadrant of the return value.
| Parameter | Type | Description |
|---|---|---|
| nm_valueY | SalNumber | One of two values whose arc tangent you want. |
| nm_valueX | SalNumber | The other of two values whose arc tangent you want. |
Returns: SalNumber. nArcTan2
Compare(x, y)
Compares two SalNumbers values.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | |
| y | SalNumber |
Returns: Int32.
CompareTo(obj)
compare to an object
| Parameter | Type | Description |
|---|---|---|
| obj | Object |
Returns: Int32.
CompareTo(x)
compare to a number
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber |
Returns: Int32.
Cos()
Computes an angle's cosine.
Returns: SalNumber. nCos
CosH()
Computes an angle's hyperbolic cosine.
Returns: SalNumber. nCosH
Divide(x, y)
/ operator for dividing two SalNumber objects
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | |
| y | SalNumber |
Returns: SalNumber.
Exponent()
Computes a value's exponential function.
Returns: SalNumber. nNumExp
HighWord()
Returns a number's high-order word value (most significant 16 bits).
Returns: SalNumber.
Hypot(nX, nY)
Computes the length of the hypotenuse of a right triangle, given the lengths of the other two sides.
| Parameter | Type | Description |
|---|---|---|
| nX | SalNumber | The length of one side of a right triangle. |
| nY | SalNumber | The length of another side of a right triangle. |
Returns: SalNumber. nHypotenuse
Log()
Computes a number's natural logarithm.
Returns: SalNumber. nLog
LogBase10()
Computes a number's base 10 logarithm.
Returns: SalNumber. nLogBase10
LowWord()
Returns a number's low-order word value (least significant 16 bits).
Returns: SalNumber. nLo
Max(x, y)
Returns the greater of two values.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | The first of two values. |
| y | SalNumber | The second of two values. |
Returns: SalNumber. nNumMax
Min(x, y)
Returns the lesser of two values.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | The first value. |
| y | SalNumber | The second value. |
Returns: SalNumber. nNumMin
Mod(nDividend)
Returns a number's modulo.
| Parameter | Type | Description |
|---|---|---|
| nDividend | SalNumber | The dividend value. |
Returns: SalNumber. nModulo
Multiply(x, y)
- operator for multiplying two SalNumber objects
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | |
| y | SalNumber |
Returns: SalNumber.
Negate(x)
Negation operator.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber |
Returns: SalNumber.
Pi()
Multiples a number by Pi. Pi is equal to 3.1415926535979323.
Returns: SalNumber. nNumPi
Power(power)
Computes nX raised to the power of nY. This function does not recognize integral, floating-point values greater than 2 to the 64th power, such as 1.0E100.
| Parameter | Type | Description |
|---|---|---|
| power | SalNumber | The exponent. |
Returns: SalNumber. nNumPower
RandInit(seed)
Sets the starting point for generating a series of pseudo-random numbers using SalNumberRandom.
| Parameter | Type | Description |
|---|---|---|
| seed | Int32 | The starting point. A whole number in the range of 0 to 32767. |
Returns: Boolean. bOk
Random()
Generates a pseudo-random number. The numbers generated by this function are integers (whole numbers) in the range 0 to 32767 (0 to 0x7FFF).
Returns: SalNumber. nRandomNum
Round()
Returns a rounded number. If the fractional part of a number is greater than or equal to .5, rounds the number up. For example, the number 124.33 returns 124; the number 124.56 returns 125.
Returns: SalNumber. nResult
Sin()
Computes an angle's sine.
Returns: SalNumber. nSin
SinH()
Computes an angle's hyperbolic sine.
Returns: SalNumber. nSinH
Sqrt()
Computes a number's square root.
Returns: SalNumber. nSqrt
Subtract(x, y)
- operator for subtracting two SalNumber objects
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | |
| y | SalNumber |
Returns: SalNumber.
Tan()
Computes an angle's tangent.
Returns: SalNumber. nTan
TanH()
Computes an angle's hyperbolic tangent.
Returns: SalNumber. nTanH
ToBoolean()
to boolean
Returns: Boolean.
ToByte()
to byte
Returns: Byte.
ToChar()
to char
Returns: Char.
ToCharacter()
Converts a decimal value to a UNICODE character.
Returns: SalString.
ToDecimal()
to decimal
Returns: Decimal.
ToDouble()
to double
Returns: Double.
ToInt16()
to int16
Returns: Int16.
ToInt32()
to int32
Returns: Int32.
ToInt64()
to int64
Returns: Int64.
ToIntPtr()
to intptr
Returns: IntPtr.
ToSByte()
to sbyte
Returns: SByte.
ToSingle()
to single
Returns: Single.
ToUInt16()
to uint16
Returns: UInt16.
ToUInt32()
to uint32
Returns: UInt32.
ToUInt64()
to uint64
Returns: UInt64.
ToWindowHandle()
Converts a number to a window handle.
Returns: SalWindowHandle. nNumber
Truncate(precision, scale)
Truncates a number.
| Parameter | Type | Description |
|---|---|---|
| precision | Int32 | The number of digits to display, starting with the leftmost. |
| scale | Int32 | The number of digits to the right of the decimal point. The nPrecision parameter must be large enough to hold the number of digits that you specify in this parameter. |
Returns: SalNumber. nResult
Used By
| Name | Description |
|---|---|
| SalBinary.Length | Returns the buffer's length. |
| SalBinary.GetBufferLength | Returns the current buffer length of the string. |
| Sal.DateYear | Returns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter. |
| SalArray.Length | Returns the total number of items in the array. For MD arrays returns the number of items in the first dimension. |
| SalArray.Dimensions | Returns the number of dimensions. |
| SalArray.Avg | Returns the average value of all the numbers in an array. |
| SalBoolean.ToString | |
| SalDateTime.Second | Returns the seconds portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter. |
| SalFileHandle.GetChar | Returns the next character in an open file. |
| SalNumber.Abs | Computes a number's absolute value. |
| SalString.Length | Returns the string's length up to the terminator char. |
| SalString.Left | |
| SalWindowHandle.SetImageString | Inserts the contents of a string into a picture. |
| SalWindowHandle.NavAddPane | Inserts a pane into the navigation bar control. |
| SalWindowHandle.NavRemovePane | Removes a pane from the navigation bar control. |
| SalWindowHandle.NavAddGroup | Adds a new group to the specified pane of a navigation bar. |
| SalWindowHandle.NavRemoveGroup | Removes a group from the navigation bar control. |
| SalWindowHandle.NavGetActivePane | Returns the index of the currently selected pane. |
| SalSqlHandle.LastErrorCode | Returns the last error code. |
| SalSqlHandle.LastErrorPosition | Returns the last error position. |
| SalSqlHandle.FetchPrevious | Fetches the previous row in a result set. |
| SalSqlSessionHandle.LastErrorCode | Returns the last error code. |
| SalSqlSessionHandle.LastErrorPosition | Returns the last error position. |
| Sql.SetSessionParameter | Sets the value of the specified session property. |
| Sql.GetSessionParameter | |
| Sql.ConnectUsingCursor | Not supported. |
| Sql.SetLongBindDatatype | Not supported. |
| Sql.ExecutionPlan | Not supported. |
| Sql.GetCursor | Not supported. |
| SalObject.Skip | skip element |
| SalObject.Count | get number of objects |
| SalSafeArray.Create | Creates a new SafeArray. |
| SalSafeArray.GetLowerBound | Returns the lower bound. |
| SalVariant.SalType | |
| SalNavigationBar.AddPane | Inserts a pane into the navigation bar control. |
| SalNavigationBar.RemovePane | Removes a pane from the navigation bar control. |
| SalNavigationBar.AddGroup | Adds a new group to the specified pane of a navigation bar. |
| SalNavigationBar.RemoveGroup | Removes a group from the navigation bar control. |
| SalNavigationBar.GetActivePane | Returns the index of the currently selected pane. |
| SalTreeControl.WinHelp | Starts the Windows help system. |
| SalTreeControl.SetFont | Sets a window's font, font size, and font enhancements. |
| SalTreeControl.GetWindowColor | Gets a window's color. |
| SalTreeItem.Value | Stores a value associated with the node. |
| SalActiveX.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalActiveX.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalBackgroundText.GetWindowColor | Gets a window's color. |
| SalCheckBox.GetWindowState | Returns a window's current state. |
| SalComboBox.KillTimer | Destroys an object's system timer. |
| SalComboBox.SetTimer | Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created. |
| SalComboBox.TrackPopupMenu | Creates pop-up menus at runtime. |
| SalComboBox.SetProperty | Sets the value of a named property. |
| SalComboBox.WinHelp | Starts the Windows help system. |
| SalComboBox.SetFont | Sets a window's font, font size, and font enhancements. |
| SalComboBox.GetWindowColor | Gets a window's color. |
| SalCustomControl.SetCursorFile | Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file. |
| SalCustomControl.SetCursor | Sets a window's cursor from a string variable. |
| SalCustomControl.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalCustomControl.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalDataField.Number | Number value property. |
| SalDataField.GetLabelText | |
| SalFrame.SetCursor | Sets a window's cursor. |
| SalFrame.SetCursorFile | Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file. |
| SalFrame.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalFrame.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalGroupBox.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalGroupBox.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalHorizontalScrollBar.PostMessage | Posts the specified message to a window by adding nMsg to hWndReceiver's message queue. |
| SalHorizontalScrollBar.SendMessage | Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete. |
| SalLine.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalLine.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalListBox.GetListItemsCount | Returns the number of list box or combo box entries. |
| SalRibbonBarBase.EndDialog | Destroys a modal dialog box and returns control to the caller of SalModalDialog. |
| SalRibbonBarBase.GetStatusBarText | |
| WindowActionsEventArgs.Return | Message return value. When set, the flag HasReturnValue is also flipped to true. |
| SalMultilineField.Validate | Validates and formats a data field's or table window column's contents. |
| SalMultilineField.SetDataLength | Sets a limit on the number of characters that a user can enter into a data field, multi line text field, or table window column. |
| SalMultilineField.GetDataLength | Returns the maximum length of a data field, multi line text field, or table window column. |
| SalOptionButton.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalOptionButton.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalPicture.GetWindowState | Returns a window's current state. |
| SalPushbutton.SetProperty | Sets the value of a named property. |
| SalPushbutton.WinHelp | Starts the Windows help system. |
| SalPushbutton.SetFont | Sets a window's font, font size, and font enhancements. |
| SalPushbutton.GetWindowColor | Gets a window's color. |
| SalRadioButton.GetFirstChild | Returns the handle of the first child window of the specified type. You can use this function to get the handles of MDI child windows. |
| SalRadioButton.GetNextChild | Returns the handle of the next child window that matches a specified type. |
| SalRadioButton.GetControlType | Returns an object's type. |
| SalUserControl.SetContextMenu | Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu. |
| SalUserControl.FormUnitsToPixels | Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size. |
| SalVerticalScrollBar.PostMessage | Posts the specified message to a window by adding nMsg to hWndReceiver's message queue. |
| SalVerticalScrollBar.SendMessage | Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete. |
| SalForm.EndDialog | Destroys a modal dialog box and returns control to the caller of SalModalDialog. |
| SalForm.GetStatusBarText | |
| SalFormTableWindow.GetLinesPerRow | Retrieves the height of a row in lines. |
| SalWindow.SetProfileParameter | Alters the specified parameter for the custom profile associated to the specified field. |
| SalWindow.GetLabelText | |
| SalTableColumn.Number | Number value property. |
| SalTableColumn.SetLocation | Moves a window to a new position (x, y) on the X and Y axes. |
| SalTableColumn.SetSize | Resizes a window. |
| SalTableColumn.KillTimer | Destroys an object's system timer. |
| SalTableColumn.SetTimer | Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created. |
| SalTableColumn.TrackPopupMenu | Creates pop-up menus at runtime. |
| SalTableColumn.SetProperty | Sets the value of a named property. |
| SalTableColumn.WinHelp | Starts the Windows help system. |
| SalTableColumn.SetFont | Sets a window's font, font size, and font enhancements. |
| SalTableColumn.GetWindowColor | Gets a window's color. |
| SalTableWindow.FireWindowActions | Dispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop. |
| SalQuickFTP.EnumDirectories | Obtain an array of directory names based on a search path specified. |
| SalQuickHTTP.SetProxy | Establish communication with an HTTP server through a proxy. |
| SalQuickTabs.FindName | Find a tab give a tab name |
| SalQuickTabsParent.TabActivateStart | Indicates that a tab has been activated. This function is called before the child windows have been shown |
| SalQuickTabsParent.TabActivateFinish | Indicates that a tab has been activated. This function is called after the child windows have been shown |
| SalQuickTabsParent.TabUserRequest | Indicates that user is attempting to change the current tab by clicking, tabbing or some other user action. NOTE: Call CancelMode() to deny the user's request |
| SalToolTipManager.AddToolEx | Associate a tip with a control. The control can be any type of window. |
| SalQuickHTML.EnumLinks | Retrieves all links for a page |
| SalDDE.AddAtom | |
| Vis.WinLoadAccelerator | |
| VisCalendar.KillTimer | |
| VisCalendar.SetTimer | |
| VisCalendar.TrackPopupMenu | |
| VisCalendar.SetProperty | |
| VisCalendar.WinHelp | |
| VisCalendar.SetFont | |
| VisCalendar.GetWindowColor | |
| VisCalendarDropDown.MoveWindow | |
| VisCalendarDropDown.PixelsToFormUnits | |
| VisColorPalette.GetFocus | |
| VisColorPaletteDropDown.GetFocus | |
| VisComboBoxBase.nValue | |
| VisComboBoxBase.nStyle | |
| VisComboBoxBase.nIndex | |
| VisComboBoxBase.nItemFlags | |
| VisComboBoxBase.hFont | |
| VisComboBoxBase.hPicNormal | |
| VisComboBoxBase.nColor | |
| VisComboBoxBase.hItem | |
| VisComboBoxBase.nLevel | |
| VisComboBoxBase.hPicSelect | |
| VisComboBoxBase.GetItemColor | |
| VisDesktopListBox.GetItemDir | |
| VisDriveListBox.Populate | |
| VisFileListBox.Populate | |
| VisFontNameComboBox.Populate | |
| VisFontNameListBox.Populate | |
| VisListBoxBase.nValue | |
| VisListBoxBase.nStyle | |
| VisListBoxBase.nIndex | |
| VisListBoxBase.nItemFlags | |
| VisListBoxBase.hFont | |
| VisListBoxBase.hPicNormal | |
| VisListBoxBase.nColor | |
| VisListBoxBase.hItem | |
| VisListBoxBase.nLevel | |
| VisListBoxBase.hPicSelect | |
| VisListBoxBase.GetItemColor | |
| VisListBoxExtension.GetRoot | |
| VisListView.ViewDetails | |
| VisListViewDropDown.SetListSize | |
| VisListViewDropDown.Arrange | |
| VisListViewDropDown.EnsureVisible | |
| VisListViewDropDown.FindItem | |
| VisMeter.SetProgress | |
| VisOutlineComboBox.nValue | |
| VisOutlineComboBox.nStyle | |
| VisOutlineComboBox.nIndex | |
| VisOutlineComboBox.nItemFlags | |
| VisOutlineComboBox.hFont | |
| VisOutlineComboBox.hPicNormal | |
| VisOutlineComboBox.nColor | |
| VisOutlineComboBox.hItem | |
| VisOutlineComboBox.nLevel | |
| VisOutlineComboBox.hPicSelect | |
| VisOutlineComboBox.Demote | |
| VisOutlineComboBox.MoveDown | |
| VisOutlineComboBox.AddFont | |
| VisOutlineListBox.nValue | |
| VisOutlineListBox.nStyle | |
| VisOutlineListBox.nIndex | |
| VisOutlineListBox.nItemFlags | |
| VisOutlineListBox.hFont | |
| VisOutlineListBox.hPicNormal | |
| VisOutlineListBox.nColor | |
| VisOutlineListBox.hItem | |
| VisOutlineListBox.nLevel | |
| VisOutlineListBox.hPicSelect | |
| VisOutlineListBox.SetProperty | |
| VisOutlineListBox.WinHelp | |
| VisOutlineListBox.SetFont | |
| VisOutlineListBox.GetWindowColor | |
| VisRadioListBox.Add | |
| VisRichEdit.KillTimer | |
| VisRichEdit.SetTimer | |
| VisRichEdit.TrackPopupMenu | |
| VisRichEdit.SetProperty | |
| VisRichEdit.WinHelp | |
| VisRichEdit.SetFont | |
| VisRichEdit.GetWindowColor | |
| VisSpinField.MoveWindow | |
| VisSpinField.PixelsToFormUnits | |
| VisSplitter.GetOrientation | |
| VisSplitterWindow.AssociateChildren | |
| VisTblEx.SetRowColor | |
| VisTblEx.SetRowHdrColor | |
| VisTblEx.SetColColor | |
| VisTblEx.SetColHdrColor | |
| VisTblEx.SetCellColor | |
| VisTblEx.GetRowColor | |
| VisTblEx.GetRowHdrColor | |
| VisTblEx.GetColColor | |
| VisTblEx.GetColHdrColor | |
| VisTblEx.GetCellColor | |
| VisTblEx.SetTableFont | |
| VisTblEx.SetRowFont | |
| VisTblEx.SetRowHdrFont | |
| VisTblEx.SetColFont | |
| VisTblEx.SetColHdrFont | |
| VisTblEx.SetCellFont | |
| VisTblEx.GetTableFont | |
| XSal.GZipPutStr | |
| XSalSplitter.SetBarSize | |
| XSalSplitter.SetBarPosition | |
| XSalSplitter.GetBarPosition |