Skip to main content

SalBoolean

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.50 (5.0.0.0)

Represents a SAL Boolean backed by a decimal value and a separate null state.

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

A default-initialized value is non-null zero. Boolean conversion treats any nonzero stored number as true. Comparisons order SAL null before non-null values; ordinary arithmetic uses the stored numbers and does not propagate null.

Example:

using PPJ.Runtime;

SalBoolean enabled = true;
bool flag = enabled; // true
SalBoolean missing = SalBoolean.Null;
bool? optional = missing; // null
SalNumber numeric = enabled; // 1

Constructors

Instance member SalBoolean(x)

Initializes a non-null Boolean from a bool value.

NameTypeDescription
xBooleanThe Boolean value; true is stored as one and false as zero.

Properties

Instance member IsNull

Boolean: Gets whether the value represents SAL null.

Instance member Value

Decimal: Gets the stored decimal value without applying SAL null semantics.

Methods

Static member Add(x, y)

Adds the stored decimal values.

ParameterTypeDescription
xSalBooleanThe left operand.
ySalBooleanThe right operand.

Returns: SalBoolean. A non-null value containing the sum.

SAL null contributes its stored zero; the result does not preserve null flags. Decimal overflow propagates.

Static member Compare(x, y)

Compares two SAL numeric values, ordering null before non-null values.

ParameterTypeDescription
xSalBooleanThe left value.
ySalBooleanThe right value.

Returns: Int32. A negative value if x precedes y, zero if equal, or a positive value if x follows y.

Two SAL null values compare equal. Non-null values are compared as decimals.

Instance member CompareTo(obj)

Compares this value with another numeric value.

ParameterTypeDescription
objObjectA SalBoolean, a boxed decimal, or null.

Returns: Int32. A negative value if this value precedes the argument, zero if equal, or a positive value if it follows.

Arguments of the same SAL type use SAL null ordering. Other arguments are passed to Decimal.CompareTo; unsupported types cause ArgumentException.

Instance member CompareTo(x)

Compares this value with another numeric value.

ParameterTypeDescription
xSalBooleanThe SAL value to compare.

Returns: Int32. A negative value if this value precedes the argument, zero if equal, or a positive value if it follows.

Uses SAL comparison ordering, with null before non-null.

Static member Divide(x, y)

Divides the stored decimal values.

ParameterTypeDescription
xSalBooleanThe dividend.
ySalBooleanThe divisor.

Returns: SalBoolean. A non-null value containing the quotient.

SAL null contributes its stored zero; the result does not preserve null flags. Decimal overflow propagates. A zero divisor throws DivideByZeroException.

Static member Multiply(x, y)

Multiplies the stored decimal values.

ParameterTypeDescription
xSalBooleanThe left operand.
ySalBooleanThe right operand.

Returns: SalBoolean. A non-null value containing the product.

SAL null contributes its stored zero; the result does not preserve null flags. Decimal overflow propagates.

Static member Negate(x)

Reverses the sign while preserving SAL null.

ParameterTypeDescription
xSalBooleanThe value to negate.

Returns: SalBoolean. The negated number, or SAL null when the argument is null.

Static member Subtract(x, y)

Subtracts the stored decimal values.

ParameterTypeDescription
xSalBooleanThe left operand.
ySalBooleanThe right operand.

Returns: SalBoolean. A non-null value containing the left value minus the right value.

SAL null contributes its stored zero; the result does not preserve null flags. Decimal overflow propagates.

Instance member ToBoolean()

Tests whether the stored number is nonzero.

Returns: Boolean. True for a nonzero value; false for zero, including SAL null.

This conversion does not preserve the SAL null flag.

Instance member ToByte()

Converts the stored number to an unsigned byte.

Returns: Byte. The low eight bits of ToInt32.

This conversion does not preserve the SAL null flag.

Instance member ToChar()

Converts the stored number to a UTF-16 character.

Returns: Char. The character represented by the low 16 bits of ToInt32.

This conversion does not preserve the SAL null flag.

Instance member ToDecimal()

Returns the stored decimal value.

Returns: Decimal. The decimal value, including zero for SAL null.

This conversion does not preserve the SAL null flag.

Instance member ToDouble()

Converts the stored number to double precision.

Returns: Double. The floating-point value; precision may be lost.

This conversion does not preserve the SAL null flag.

Instance member ToInt16()

Converts the stored number to a signed 16-bit integer.

Returns: Int16. The low 16 bits of ToInt32, interpreted as a signed integer.

This conversion does not preserve the SAL null flag.

Instance member ToInt32()

Converts the stored number to a signed 32-bit integer.

Returns: Int32. The integral part, with excess high bits discarded when needed.

Uses the low 32 bits of the truncated decimal magnitude with its sign applied. This conversion does not preserve the SAL null flag.

Instance member ToInt64()

Converts the stored number to a signed 64-bit integer.

Returns: Int64. The integral part, truncated toward zero.

Throws OverflowException when the value is outside the signed 64-bit range. This conversion does not preserve the SAL null flag.

Instance member ToIntPtr()

Converts the stored number to a pointer-sized integer.

Returns: IntPtr. An IntPtr containing the converted value.

Uses ToInt32 even in a 64-bit process. This conversion does not preserve the SAL null flag.

Instance member ToSByte()

Converts the stored number to a signed byte.

Returns: SByte. The low eight bits of ToInt32, interpreted as a signed byte.

This conversion does not preserve the SAL null flag.

Instance member ToSingle()

Converts the stored number to single precision.

Returns: Single. The floating-point value; precision may be lost.

This conversion does not preserve the SAL null flag.

Instance member ToUInt16()

Converts the stored number to an unsigned 16-bit integer.

Returns: UInt16. The low 16 bits of ToInt32.

This conversion does not preserve the SAL null flag.

Instance member ToUInt32()

Converts the stored number to an unsigned 32-bit integer.

Returns: UInt32. The ToInt32 result cast to an unsigned integer.

This conversion does not preserve the SAL null flag.

Instance member ToUInt64()

Converts the stored number to an unsigned 64-bit integer.

Returns: UInt64. The integral part, truncated toward zero.

Throws OverflowException when the value cannot be represented as an unsigned 64-bit integer. This conversion does not preserve the SAL null flag.

Used By

NameDescription
Sal.AbortSignals an application-abort request by throwing AbortException.
SalBoolean.AddAdds the stored decimal values.
SalFileHandle.CopyCopies a file and reports a SAL file-copy status.
SalFileHandle.CreateDirectoryCreates a directory and any missing parent directories.
SalWindowHandle.DrawMenuBar
SalSqlHandle.CloseAllSPResultSetsCloses the active result set and releases its reader or buffered data.
Sql.ClearImmediateDisconnects the reusable handle used by immediate SQL operations.
SalObject.GetLastErrorCopies details of the most recently handled exception into an error record.
SalSafeArray.CreateCreates a new one-dimensional managed array and replaces the wrapped value.
SalVariant.AsActiveXConverts and replaces the stored value using a supported automation scalar type.
SalNavigationBar.AddPaneCreates a navigation pane with the specified name, caption, and state images.
SalTreeControl.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalActiveX.AutoErrorModeConfigures automatic error handling for SAL COM object wrappers.
SalBackgroundText.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalCheckBox.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalComboBox.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalCustomControl.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalDataField.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalFrame.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalGroupBox.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalHorizontalScrollBar.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalLine.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalListBox.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalRibbonBarMDI.MDIArrangeIconsArranges minimized child-window icons in this MDI container.
SalRibbonBarBase.DrawMenuBarUpdateMainMenu applied to this form.
SalMultilineField.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalOptionButton.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalPicture.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalPushbutton.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalRadioButton.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalUserControl.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalVerticalScrollBar.BringWindowToTopBrings this control to the front, or activates it when it is a top-level or MDI form.
SalForm.DrawMenuBarUpdateMainMenu applied to this form.
SalFormTableWindow.AnyRowsChecks both grids for a nondeleted row matching the flag filters.
SalMDIWindow.MDIArrangeIconsArranges minimized child-window icons in this MDI container.
SalWindow.GetFormParameterGets a form parameter directly from a SalForm.
SalTableColumn.DefineCheckBoxColumnConfigures this column as check boxes with mapped cell values.
SalTableWindow.AnyRowsChecks both grids for a nondeleted row matching the flag filters.
SalQuickFTP.OpenFileAccepts the remote-file open compatibility request.
SalQuickFTP.PutFileUploads a local file, optionally starting asynchronously.
SalQuickFTP.GetFileDownloads a remote file with resume enabled.
SalQuickTabs.AddAppends an unnamed tab page.
SalQuickTabs.InsertInserts an unnamed page while preserving the selected numeric index.
SalQuickTabsParent.TabCreateHandles notification that a QuickTabs frame has been created.
SalQuickToolTipCheckBox.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipChildTable.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipComboBox.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipDataField.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipHScrollBar.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipListBox.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipMultilineField.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipOptionButton.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipPicture.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipPushButton.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipRadioButton.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipTableWindow.AddToolAssociates tooltip text and status text with a control.
SalQuickToolTipVScrollBar.AddToolAssociates tooltip text and status text with a control.
SalToolTipManager.AddToolAssociates tooltip text and status text with a control.
SalDDE.Extract
Vis.ArrayFillDateTime
VisCalendar.SetWeekStart
VisCalendarDropDown.GetFocusDate
VisColorPalette.SetFocus
VisColorPaletteDropDown.SetFocus
VisComboBoxBase.SetItemFlags
VisDirListBox.Populate
VisDirTreeListBox.Populate
VisFontNameComboBox.GetSelectedFont
VisFontNameListBox.GetSelectedFont
VisListBoxBase.SetItemFlags
VisListBoxExtension.SetFlags
VisListView.Arrange
VisListViewDropDown.GetEditable
VisOutlineComboBox.SetItemFlags
VisOutlineListBox.SetItemFlags
VisRadioListBox.Add
VisRadioListBox.Insert
VisRadioListBox.AddValue
VisRadioListBox.InsertValue
VisRichEdit.LineScroll
VisSpinField.IsValidNumber
VisSplitter.SetChild
VisSplitterWindow.SetChild
VisTblEx.SetRowColor
XSal.SetWindowImage
XSalHSplitter.SetTopFrame
XSalSplitter.SetBarSize
XSalVSplitter.SetLeftFrame