Numeric Operations

The following functions manipulate and manage numeric data:

ABS

Return the absolute value of a numeric expression

AND

AND works as both a logical and a bitwise arithmetic operator

ARRAY ASSIGN

Assign a number of values to successive elements of an array

ARRAY DELETE

Delete a single item from a given array

ARRAY INSERT

Insert a single item into a given array

ARRAY SCAN

Scan all or part of an array for a given value

ARRAY SORT

Sort all or part of a given array

ASC

Return the ASCII code of the specified character in a string 

ASC

Place an ASCII byte at the specified position in a string

ATN

Return the arctangent of its argument

BIN$

Return a string with the binary (base 2) representation of a value

BIT CALC

Set or reset a bit in an integral-class variable

BIT

Return the value of a particular bit in an integral-class variable

BIT

Manipulate individual bits of an integral-class variable

BITS

Return the least significant portion of an integral-class value

BITS

Return the least significant 8, 16, or 32 bits of an argument

BITSE

Compare integral-class values for equivalent bits regardless of sign

CBYT

Convert a value to a Byte data type

CCUR

Convert a value to a Currency data type

CCUX

Convert a value to a Extended Currency data type

CDBL

Convert a value to a Double-precision data type

CDWD

Convert a value to a Double-word data type

CEIL

Return an integer that is greater than or equal to an argument

CEXT

Convert a value to a Extended-precision data type

CHOOSE

Return one of several values, based upon the value of an index

CINT

Convert a value to a integral data type

CLNG

Convert a value to a Long-integer data type

COS

Return the cosine of an argument

CQUD

Convert a value to a Quad-integer data type

CSNG

Convert a value to a Single-precision data type

CVBYT

Convert binary encoded string data to a byte value

CVCUR

Convert binary encoded string data to a Currency value

CVCUX

Convert binary encoded string data to Extended Currency

CVD

Convert binary encoded string data to a Double-precision value

CVDWD

Convert binary encoded string data to a Double-word value

CVE

Convert binary encoded string data to Extended-precision

CVI

Convert binary encoded string data to an integral value

CVL

Convert binary encoded string data to a Long-integer value

CVQ

Convert binary encoded string data to a Quad-integer value

CVS

Convert binary encoded string data to a Single-precision value

CVWRD

Convert binary encoded string data to a Word value

CWRD

Convert a value to a Word data type

DEC$

Convert an integral value to a decimal string.

DECR

Decrement a variable, pointer, or pointer target

DEFBYT

Declare the default variable type to be Byte

DEFCUR

Declare the default variable type to be Currency

DEFCUX

Declare the default variable type to be Extended Currency

DEFDBL

Declare the default variable type to be Double-precision

DEFDWD

Declare the default variable type to be Double-word

DEFEXT

Declare the default variable type to be Extended-precision

DEFINT

Declare the default variable type to be integral value

DEFLNG

Declare the default variable type to be Long-integer

DEFQUD

Declare the default variable type to be Quad-integer

DEFSNG

Declare the default variable type to be Single-precision

DEFSTR

Declare the default variable type to be String

DEFWRD

Declare the default variable type to be Word

ENUM/END ENUM

Creates a group of logically related numeric equates.

EQV

Perform a logical or a bitwise Equivalence operation

EXP

Return a base number raised to a power, with a base of e

EXP2

Return a base number raised to a power, with a base of 2

EXP10

Return a base number raised to a power, with a base of 10

FIX

Truncate a floating-point number to an integral value

FORMAT$

Format numeric data according to a string mask expression

FRAC

Return the fractional part of a floating-point number

HEX$

Hexadecimal (base 16) string representation of an argument

HI

Extract the most significant (high-order) portion of an argument

IIF

Return one of two values based upon a True/False evaluation

IMP

Perform a logical or a bitwise Implication operation

INCR

Increment a variable, pointer, or pointer target

INT

Convert a numeric expression to an integral-class value

ISFALSE

Return the logical falsity of a given expression

ISNOTHING

Determine the current status of a given object variable

ISOBJECT

Determine the current status of a given object variable

ISTRUE

Return the logical truth of a given expression

LBOUND

Return the lowest subscript of an array's specific dimension

LEN

Return the logical length of a variable, UDT, or Union

LET

Assign a value to a variable

LET (with Variants)

Assign a value or an object reference to a variant variable

LO

Extract the least significant (low-order) portion of an argument

LOG

Return the natural (base e) logarithm of an argument

LOG2

Return the base 2 logarithm of an argument

LOG10

Return the base 10 logarithm of an argument

MAT

Matrix calculations on numeric arrays

MAX

Return the argument with the largest (maximum) value

MIN

Return the argument with the smallest (minimum) value

MOD

Return the remainder of the division between two numbers

NOT

The NOT operator works as a bitwise arithmetic operator

OCT$

Return a string that is a octal (base 8) representation of a value

OR

Perform a logical or a bitwise OR arithmetic operation

PEEK

Return the byte at a specific memory location

POKE

Store a byte at a specific memory location

RANDOMIZE

Seed the random number generator

RESET

Set a variable, array subscript, or an entire array to zero

RGB

Return a composite RGB color value

RND

Return a random number

ROTATE

Rotate the bits in an integral-class variable

ROUND

Round a numeric value to a specified number of decimal places

SGN

Return the sign of a numeric expression

SHIFT

Shift the bits in an integral-class variable

SIN

Return the sine of an argument

SQR

Return the square root of an argument

SWAP

Exchange the values of two variables, pointers, or pointer targets

SWITCH

Return one item of a series based upon a True/False evaluation

TAN

Return the tangent of an argument

UBOUND

Return the highest subscript of an array's specific dimension

USING$

Format string/numeric expressions using a mask string

VAL function

Returns the numeric equivalent of a string argument

VAL statement

Converts a text string to a numeric value with additional information.

VARIANT#

Return the numeric value contained in a Variant variable

XOR

Perform a logical or a bitwise Exclusive-OR operation