Skip to main content
Version: 2023

SalNumber

Namespace: PPJ.Runtime

Assembly: PPJ.Web.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, IWisejSerializable

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
Sal.ValidateSetNot supported.
Sal.FileOpenExt
Sal.FontGetSizes
Sys.nArgCountThis variable's value is equal to the number of command line arguments you enter.
SalBinary.LengthReturns the buffer's length.
SalBinary.GetBufferLengthReturns the current buffer length of the string.
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.GetTableFlagsTests the state of a table window's flags.
SalWindowHandle.ScrollRowScrolls a table window to the specified row and column.
SalWindowHandle.SetColumnTextAssigns data to a column of a table window's context row.
SalWindowHandle.SetContextRowSets a table window's context row. Setting the context row does not send a SAM_FetchRow message. If the row is not currently in memory, creates a new row in memory and sets its cell values to null.
SalWindowHandle.SetFlagsAnyRowsSets or clears row flags.
SalWindowHandle.SetFocusCellSets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.
SalWindowHandle.SetFocusRowSets a table window's focus frame row.
SalWindowHandle.SetLinesPerRowSets the height of a row in lines.
SalWindowHandle.SetLockedColumnsSets the number of locked table window columns.
SalWindowHandle.SetRangeDefines the minimum and maximum rows (range) of a table.
SalWindowHandle.SetRowSets the focus to the first, last, next, or previous row in a table window.
SalBackgroundText.SetContextMenuDefines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
SalBackgroundText.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.
SalCheckBox.PostMessagePosts the specified message to a window by adding nMsg to hWndReceiver's message queue.
SalCheckBox.SendMessageSends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
SalComboBox.SetPropertySets the value of a named property.
SalComboBox.SetFontSets a window's font, font size, and font enhancements.
SalComboBox.GetWindowColorGets a window's color.
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.IsValidDecimalVerifies whether a data field, multiline text field, or table window column contains a valid decimal value. For multiline text fields, the decimal value must be the only item in the field.
SalDataField.GetFormatCodeReturns the current format of a data field or table window column.
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.FireWindowActionsDispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.
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.GetListItemStateDetermines whether the specified list box or combo box entry is selected.
SalListBox.GetListItemText
SalMultilineField.GetNextChildReturns the handle of the next child window that matches a specified type.
SalMultilineField.GetControlTypeReturns an object's type.
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.
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.GetNextChildReturns the handle of the next child window that matches a specified type.
SalPicture.GetControlTypeReturns an object's type.
SalPushbutton.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.
SalPushbutton.TrackPopupMenuCreates pop-up menus at runtime.
SalPushbutton.SetPropertySets the value of a named property.
SalPushbutton.SetFontSets a window's font, font size, and font enhancements.
SalPushbutton.GetWindowColorGets a window's color.
SalRadioButton.GetWindowStateReturns a window's current state.
SalTreeControl.SetWindowColorSets a window's color.
SalTreeControl.ClearCursorClears a window's cursor.
SalTreeControl.SetCursorSets a window's cursor.
SalTreeControl.SetCursorFileSets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.
SalTreeControl.GetDataTypeReturns a data field's or table window column's data type.
SalTreeItem.ValueStores a value associated with the node.
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.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.
SalFormTableWindow.AnyRowsDetermines whether any rows in the specified table window match certain flags.
SalFormTableWindow.ColumnAverageComputes the average of all column values or only specified column values in a table window.
SalWindow.SetProfileParameterAlters the specified parameter for the custom profile associated to the specified field.
SalWindow.SendMessageToChildrenSends a message to all child items of a form window, dialog box, table window, or MDI window.
SalWindow.SendMessageToChildrenInternalSends a message to all child items of a form window, dialog box, table window, or MDI window.
SalWindow.TranslateSalColorConverts SAL colors to a .NET Color.
SalWindow.GetLabelText
SalTableColumn.NumberNumber value property.
SalTableColumn.GetListItemText
SalTableWindow.SetFlagsAnyRowsSets or clears row flags.
SalTableWindow.SetFocusRowSets a table window's focus frame row.
SalTableWindow.SetFocusCellSets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.
SalTableWindow.SetLinesPerRowSets the height of a row in lines.
SalTableWindow.SetLockedColumnsSets the number of locked columns.
SalTableWindow.SetRangeDefines the minimum and maximum rows (range) of a table.
SalTableWindow.SetRowSets the focus to the first, last, next, or previous row in a table window.
WindowActionsEventArgs.ReturnMessage return value. When set, the flag HasReturnValue is also flipped to true.
SalQuickTabs.GetRowCountRetrieve the number rows of tabs
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
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.SetParameterSets the value of a database parameter.
Sql.SetLockTimeoutSpecifies the maximum time to wait before generating an error.
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
stdole_Font.PropSetSize
stdole_Font.PropSetWeight
stdole_Font.PropSetCharset
stdole_Picture.Render
stdole_Picture.PropSetHandle
stdole_Picture.PropSethPal
stdole_Picture.PropSetType
stdole_Picture.PropSetWidth
stdole_Picture.PropSetHeight
Vis.MenuSetPicture
Vis.MenuSetText
Vis.MenuUncheck
Vis.ProfileEnumStrings
VisCalendar.SetSize
VisCalendar.KillTimer
VisCalendar.SetTimer
VisCalendar.TrackPopupMenu
VisCalendar.SetProperty
VisCalendar.SetFont
VisCalendar.GetWindowColor
VisCalendarDropDown.GetNextChild
VisCalendarDropDown.GetControlType
VisComboBoxBase.nValue
VisComboBoxBase.nStyle
VisComboBoxBase.nIndex
VisComboBoxBase.nItemFlags
VisComboBoxBase.hFont
VisComboBoxBase.hPicNormal
VisComboBoxBase.nColor
VisComboBoxBase.hItem
VisComboBoxBase.nLevel
VisComboBoxBase.hPicSelect
VisComboBoxBase.AddFontValue
VisDesktopListBox.GetItemDir
VisDriveComboBox.Populate
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.AddFontValue
VisListBoxExtension.LoadChild
VisListView.SetContextMenu
VisListView.FormUnitsToPixels
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.EnumDescendents
VisOutlineListBox.nValue
VisOutlineListBox.nStyle
VisOutlineListBox.nIndex
VisOutlineListBox.nItemFlags
VisOutlineListBox.hFont
VisOutlineListBox.hPicNormal
VisOutlineListBox.nColor
VisOutlineListBox.hItem
VisOutlineListBox.nLevel
VisOutlineListBox.hPicSelect
VisOutlineListBox.GetListItemsCount
VisRadioListBox.Add
VisSpinField.PostMessage
VisSpinField.SendMessage
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.ScriptCreate
XSalSplitter.SetSize
XSalSplitter.KillTimer
XSalSplitter.SetTimer
XSalSplitter.TrackPopupMenu
XSalSplitter.SetProperty
XSalSplitter.SetFont
XSalSplitter.GetWindowColor