Variant

Description

A class that wraps multiple data types, especially for scripts that are converted from SBM AppScript to SBM ModScript.

Variant is supported in SBM ModScript in order to ease conversion from SBM AppScript. Variant is modeled after VBScript's "Variant".

The following data types can be represented by Variant:

Data Types Variant Data Type

bool

Boolean

double

Double

float

Single

short

Integer

int

Long

int64_t

Int64

uint64_t

UInt64

string

String

Variant date

Date

AppRecord (and child classes)

Object

AppDb

Object

AppRecordList (and child classes)

Object

Lib

Object

Dictionary

Dictionary

Log

Object

DbImport

Object

Constructors

Operators

Copy operators:

Math operators:

Comparison operators:

Note: Variant can compare strings to numbers such as "1"==1.

Other operators:

SBM AppScript conversion operators:

Methods

Conversion methods:

Note: Variant can be implicitly converted to and from every data type that it can internally represent. (Variant will not be implicitly converted to string, but can be explicitly converted using to_string().

Related Topics

Object Types

Working with Application Objects