Skip to main content

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.

public struct SalNumber : ValueType, IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable

Constructors

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xDecimal

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xDouble

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xSingle

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xInt32

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xUInt32

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xInt64

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xUInt64

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xInt16

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xUInt16

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xChar

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xByte

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xBoolean

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xEnum

Instance memberSalNumber(x)

Creates a new SalNumber.

NameTypeDescription
xIntPtr

Properties

Instance memberIsNull

Boolean: Checks if this SalNumber object contain a null value.

Instance memberValue

Decimal: Returns the inner decimal value

Methods

Instance memberAbs()

Computes a number's absolute value.

Returns: SalNumber. nNum

Static memberAdd(x, y)

  • operators for adding two SalNumber objects
ParameterTypeDescription
xSalNumber
ySalNumber

Returns: SalNumber.

Instance memberArcCos()

Computes the arc cosine of a value in the range 0 to 1. The value's domain is -1 to 1.

Returns: SalNumber. nArcCos

Instance memberArcSin()

Computes a value's arc sine. The value's domain is -1 to 1.

Returns: SalNumber. nArcSin

Instance memberArcTan()

Computes a value's arc tangent.

Returns: SalNumber. nArcTan

Static memberArcTan2(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.

ParameterTypeDescription
nm_valueYSalNumberOne of two values whose arc tangent you want.
nm_valueXSalNumberThe other of two values whose arc tangent you want.

Returns: SalNumber. nArcTan2

Static memberCompare(x, y)

Compares two SalNumbers values.

ParameterTypeDescription
xSalNumber
ySalNumber

Returns: Int32.

Instance memberCompareTo(obj)

compare to an object

ParameterTypeDescription
objObject

Returns: Int32.

Instance memberCompareTo(x)

compare to a number

ParameterTypeDescription
xSalNumber

Returns: Int32.

Instance memberCos()

Computes an angle's cosine.

Returns: SalNumber. nCos

Instance memberCosH()

Computes an angle's hyperbolic cosine.

Returns: SalNumber. nCosH

Static memberDivide(x, y)

/ operator for dividing two SalNumber objects

ParameterTypeDescription
xSalNumber
ySalNumber

Returns: SalNumber.

Instance memberExponent()

Computes a value's exponential function.

Returns: SalNumber. nNumExp

Instance memberHighWord()

Returns a number's high-order word value (most significant 16 bits).

Returns: SalNumber.

Static memberHypot(nX, nY)

Computes the length of the hypotenuse of a right triangle, given the lengths of the other two sides.

ParameterTypeDescription
nXSalNumberThe length of one side of a right triangle.
nYSalNumberThe length of another side of a right triangle.

Returns: SalNumber. nHypotenuse

Instance memberLog()

Computes a number's natural logarithm.

Returns: SalNumber. nLog

Instance memberLogBase10()

Computes a number's base 10 logarithm.

Returns: SalNumber. nLogBase10

Instance memberLowWord()

Returns a number's low-order word value (least significant 16 bits).

Returns: SalNumber. nLo

Static memberMax(x, y)

Returns the greater of two values.

ParameterTypeDescription
xSalNumberThe first of two values.
ySalNumberThe second of two values.

Returns: SalNumber. nNumMax

Static memberMin(x, y)

Returns the lesser of two values.

ParameterTypeDescription
xSalNumberThe first value.
ySalNumberThe second value.

Returns: SalNumber. nNumMin

Instance memberMod(nDividend)

Returns a number's modulo.

ParameterTypeDescription
nDividendSalNumberThe dividend value.

Returns: SalNumber. nModulo

Static memberMultiply(x, y)

  • operator for multiplying two SalNumber objects
ParameterTypeDescription
xSalNumber
ySalNumber

Returns: SalNumber.

Static memberNegate(x)

Negation operator.

ParameterTypeDescription
xSalNumber

Returns: SalNumber.

Instance memberPi()

Multiples a number by Pi. Pi is equal to 3.1415926535979323.

Returns: SalNumber. nNumPi

Instance memberPower(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.

ParameterTypeDescription
powerSalNumberThe exponent.

Returns: SalNumber. nNumPower

Static memberRandInit(seed)

Sets the starting point for generating a series of pseudo-random numbers using SalNumberRandom.

ParameterTypeDescription
seedInt32The starting point. A whole number in the range of 0 to 32767.

Returns: Boolean. bOk

Static memberRandom()

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

Instance memberRound()

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

Instance memberSin()

Computes an angle's sine.

Returns: SalNumber. nSin

Instance memberSinH()

Computes an angle's hyperbolic sine.

Returns: SalNumber. nSinH

Instance memberSqrt()

Computes a number's square root.

Returns: SalNumber. nSqrt

Static memberSubtract(x, y)

  • operator for subtracting two SalNumber objects
ParameterTypeDescription
xSalNumber
ySalNumber

Returns: SalNumber.

Instance memberTan()

Computes an angle's tangent.

Returns: SalNumber. nTan

Instance memberTanH()

Computes an angle's hyperbolic tangent.

Returns: SalNumber. nTanH

Instance memberToBoolean()

to boolean

Returns: Boolean.

Instance memberToByte()

to byte

Returns: Byte.

Instance memberToChar()

to char

Returns: Char.

Instance memberToCharacter()

Converts a decimal value to a UNICODE character.

Returns: SalString.

Instance memberToDecimal()

to decimal

Returns: Decimal.

Instance memberToDouble()

to double

Returns: Double.

Instance memberToInt16()

to int16

Returns: Int16.

Instance memberToInt32()

to int32

Returns: Int32.

Instance memberToInt64()

to int64

Returns: Int64.

Instance memberToIntPtr()

to intptr

Returns: IntPtr.

Instance memberToSByte()

to sbyte

Returns: SByte.

Instance memberToSingle()

to single

Returns: Single.

Instance memberToUInt16()

to uint16

Returns: UInt16.

Instance memberToUInt32()

to uint32

Returns: UInt32.

Instance memberToUInt64()

to uint64

Returns: UInt64.

Instance memberToWindowHandle()

Converts a number to a window handle.

Returns: SalWindowHandle. nNumber

Instance memberTruncate(precision, scale)

Truncates a number.

ParameterTypeDescription
precisionInt32The number of digits to display, starting with the leftmost.
scaleInt32The 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

NameDescription
SalBinary.LengthReturns the buffer's length.
SalBinary.GetBufferLengthReturns the current buffer length of the string.
Sal.DateYearReturns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.
SalArray.LengthReturns the total number of items in the array. For MD arrays returns the number of items in the first dimension.
SalArray.DimensionsReturns the number of dimensions.
SalArray.AvgReturns the average value of all the numbers in an array.
SalBoolean.ToString
SalDateTime.SecondReturns the seconds portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.
SalFileHandle.GetCharReturns the next character in an open file.
SalNumber.AbsComputes a number's absolute value.
SalString.LengthReturns the string's length up to the terminator char.
SalString.Left
SalWindowHandle.SetImageStringInserts the contents of a string into a picture.
SalWindowHandle.NavAddPaneInserts a pane into the navigation bar control.
SalWindowHandle.NavRemovePaneRemoves a pane from the navigation bar control.
SalWindowHandle.NavAddGroupAdds a new group to the specified pane of a navigation bar.
SalWindowHandle.NavRemoveGroupRemoves a group from the navigation bar control.
SalWindowHandle.NavGetActivePaneReturns the index of the currently selected pane.
SalSqlHandle.LastErrorCodeReturns the last error code.
SalSqlHandle.LastErrorPositionReturns the last error position.
SalSqlHandle.FetchPreviousFetches the previous row in a result set.
SalSqlSessionHandle.LastErrorCodeReturns the last error code.
SalSqlSessionHandle.LastErrorPositionReturns the last error position.
Sql.SetSessionParameterSets the value of the specified session property.
Sql.GetSessionParameter
Sql.ConnectUsingCursorNot supported.
Sql.SetLongBindDatatypeNot supported.
Sql.ExecutionPlanNot supported.
Sql.GetCursorNot supported.
SalObject.Skipskip element
SalObject.Countget number of objects
SalSafeArray.CreateCreates a new SafeArray.
SalSafeArray.GetLowerBoundReturns the lower bound.
SalVariant.SalType
SalNavigationBar.AddPaneInserts a pane into the navigation bar control.
SalNavigationBar.RemovePaneRemoves a pane from the navigation bar control.
SalNavigationBar.AddGroupAdds a new group to the specified pane of a navigation bar.
SalNavigationBar.RemoveGroupRemoves a group from the navigation bar control.
SalNavigationBar.GetActivePaneReturns the index of the currently selected pane.
SalTreeControl.WinHelpStarts the Windows help system.
SalTreeControl.SetFontSets a window's font, font size, and font enhancements.
SalTreeControl.GetWindowColorGets a window's color.
SalTreeItem.ValueStores a value associated with the node.
SalActiveX.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalActiveX.FormUnitsToPixelsComputes 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.GetWindowColorGets a window's color.
SalCheckBox.GetWindowStateReturns a window's current state.
SalComboBox.KillTimerDestroys an object's system timer.
SalComboBox.SetTimerCreates 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.TrackPopupMenuCreates pop-up menus at runtime.
SalComboBox.SetPropertySets the value of a named property.
SalComboBox.WinHelpStarts the Windows help system.
SalComboBox.SetFontSets a window's font, font size, and font enhancements.
SalComboBox.GetWindowColorGets a window's color.
SalCustomControl.SetCursorFileSets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.
SalCustomControl.SetCursorSets a window's cursor from a string variable.
SalCustomControl.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalCustomControl.FormUnitsToPixelsComputes 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.NumberNumber value property.
SalDataField.GetLabelText
SalFrame.SetCursorSets a window's cursor.
SalFrame.SetCursorFileSets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.
SalFrame.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalFrame.FormUnitsToPixelsComputes 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.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalGroupBox.FormUnitsToPixelsComputes 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.PostMessagePosts the specified message to a window by adding nMsg to hWndReceiver's message queue.
SalHorizontalScrollBar.SendMessageSends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
SalLine.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalLine.FormUnitsToPixelsComputes 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.GetListItemsCountReturns the number of list box or combo box entries.
SalRibbonBarBase.EndDialogDestroys a modal dialog box and returns control to the caller of SalModalDialog.
SalRibbonBarBase.GetStatusBarText
WindowActionsEventArgs.ReturnMessage return value. When set, the flag HasReturnValue is also flipped to true.
SalMultilineField.ValidateValidates and formats a data field's or table window column's contents.
SalMultilineField.SetDataLengthSets 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.GetDataLengthReturns the maximum length of a data field, multi line text field, or table window column.
SalOptionButton.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalOptionButton.FormUnitsToPixelsComputes 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.GetWindowStateReturns a window's current state.
SalPushbutton.SetPropertySets the value of a named property.
SalPushbutton.WinHelpStarts the Windows help system.
SalPushbutton.SetFontSets a window's font, font size, and font enhancements.
SalPushbutton.GetWindowColorGets a window's color.
SalRadioButton.GetFirstChildReturns 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.GetNextChildReturns the handle of the next child window that matches a specified type.
SalRadioButton.GetControlTypeReturns an object's type.
SalUserControl.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalUserControl.FormUnitsToPixelsComputes 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.PostMessagePosts the specified message to a window by adding nMsg to hWndReceiver's message queue.
SalVerticalScrollBar.SendMessageSends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
SalForm.EndDialogDestroys a modal dialog box and returns control to the caller of SalModalDialog.
SalForm.GetStatusBarText
SalFormTableWindow.GetLinesPerRowRetrieves the height of a row in lines.
SalWindow.SetProfileParameterAlters the specified parameter for the custom profile associated to the specified field.
SalWindow.GetLabelText
SalTableColumn.NumberNumber value property.
SalTableColumn.SetLocationMoves a window to a new position (x, y) on the X and Y axes.
SalTableColumn.SetSizeResizes a window.
SalTableColumn.KillTimerDestroys an object's system timer.
SalTableColumn.SetTimerCreates 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.TrackPopupMenuCreates pop-up menus at runtime.
SalTableColumn.SetPropertySets the value of a named property.
SalTableColumn.WinHelpStarts the Windows help system.
SalTableColumn.SetFontSets a window's font, font size, and font enhancements.
SalTableColumn.GetWindowColorGets a window's color.
SalTableWindow.FireWindowActionsDispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.
SalQuickFTP.EnumDirectoriesObtain an array of directory names based on a search path specified.
SalQuickHTTP.SetProxyEstablish communication with an HTTP server through a proxy.
SalQuickTabs.FindNameFind a tab give a tab name
SalQuickTabsParent.TabActivateStartIndicates that a tab has been activated. This function is called before the child windows have been shown
SalQuickTabsParent.TabActivateFinishIndicates that a tab has been activated. This function is called after the child windows have been shown
SalQuickTabsParent.TabUserRequestIndicates 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.AddToolExAssociate a tip with a control. The control can be any type of window.
SalQuickHTML.EnumLinksRetrieves 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