Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

Sometimes I can't help seeing all the way through.

- Todd Rundgren

 

aztec.system.int

public class final int from<Base>

Base

int

The int class is a primitive class which represents a signed eight byte integer. An integer object is treated as a value by default, and can be used directly in mathematical expressions. The valid range for an eight byte integer is from -9223372036854775808 to +9223372036854775807.

 

There are also methods available in the int class framework to examine or modify the internal binary representation of the integer value, at the individual bit level or at a 1 byte, 2 byte or 4 byte integer level. There is a special enumeration named 'SmallInt' with the following definition that is used to indicate what size of small integer is being used.

 

public enum SmallInt { Int8, Int16, Int32 }

 

This SmallInt enumeration is also used in the StreamIO framework to indicate an alternate size or configuration for an integer used in input or output. The following table shows the minimum and maximum allowed integer values for each of the SmallInt enumerations, based on the setting of the "is signed" flag. There are also constants defined below for the minimum and maximum values for each combination of integer size and signed attribute.

Small Integer Sizes

 

The integer instance methods, VM global methods and Compiler Methods can be used to perform a wide array of integer and conversion operations. Each type of method has a separate column in the following method table with a link to the applicable method description.

int Methods

Compiler
Global
Instance/Shared
Description
-
-
Constructor for the 'int' class to initialize with an integer value (valid for dynamic allocation only)
- - int() Constructor for the 'int' class to initialize with a floating point value (valid for dynamic allocation only)
-
-
Constructor for the 'int' class to initialize with a string value (valid for dynamic allocation only)
Returns a string representation of the integer value with formatting options
Returns a string with character representing the ASCII decimal value
Returns a floating pointer representation of the integer value
Increments the integer value and returns the result
CompilerDec() Dec() Dec() Decrements the integer value and returns the result
CompilerAdd() Add() Add() Adds a value to the integer value and returns the result
CompilerSub() Sub() Sub() Subtracts a value from the integer value and returns the result
CompilerMult() Mult() Mult() Multiplies the integer value by a specified value and returns the result
CompilerDiv() Div() Div() Divides the integer value by a specified value and returns the result
CompilerMod() Mod() Mod() Divides the integer value by a specified value and returns the remainder
Raises the integer value to a specified power and returns the result
CompilerAbs() Abs() Abs() Takes the absolute vaue of the integer value and returns the result
CompilerShiftLeft() ShiftLeft() ShiftLeft() Shifts the integer value to the left by a specified number of bits and returns result
CompilerShiftRight() ShiftRight() ShiftRight() Shifts the integer value to the right by a specified number of bits and returns result
CompilerBitOr() BitOr() BitOr() Performs a Bitwise OR operation on the integer value and returns the result
CompilerBitAnd() BitAnd() BitAnd() Performs a Bitwise AND operation on the integer value and returns the result
CompilerBitXOr() BitXOr() BitXOr() Performs a Bitwise XOR operation on the integer value and returns the result
CompilerBitNot() BitNot() BitNot() Performs a Bitwise NOT operation on the integer value and returns the result
CompilerBitOn() BitOn() BitOn() Sets a specific bit ON in the 8 byte integer using one based index (1-64) and returns the result
CompilerBitOff() BitOff() BitOff() Sets a specific bit OFF in the 8 byte integer using one based index (1-64) and returns the result
CompilerBitTest() BitTest() BitTest() Returns true if a specific bit is turned ON using one based index (1-64)
CompilerBitStr() BitStr() BitStr() Returns a string of zeroes and ones representing the bit pattern in the integer
CompilerValidInt() ValidInt() ValidInt() Returns true if integer value is in range of a valid 8, 16 or 32 bit signed or unsigned integer
CompilerInt() Int() Int() Returns integer extracted from within the integer value using one based position and size (8, 16 or 32 bits)
CompilerIntOvr() IntOvr() Ovr() Overlays a small integer onto the 64 bit integer value using one based position and size (8, 16 or 32 bits) and returns the result
CompilerRandomInt() RandomInt() Random() Returns a random integer within the specified range (Random() is a shared 'int' method).

int Constants

Constant Data Item Data Type Value
int.MaxValue int +9223372036854775807
Int.MaxValue8 int +127
Int.MaxValue16 int +32767
int.MaxValue32 int +2147483647
Int.MaxValue64 int +9223372036854775807
int.MinValue int -9223372036854775808
Int.MinValue8 int -128
Int.MinValue16 int -32768
Int.MinValue32 int -2147483648
Int.MinValue64 int -9223372036854775808
int.MaxUnsignedValue8 int +255
int.MaxUnsignedValue16 int +65535
int.MaxUnsignedValue32 int +4294967295
int.MinUnsignedValue8 int 0
int.MinUnsignedValue16 int 0
int.MinUnsignedValue32 int 0
int.Size int 8
int.Size8 int 1
Int.Size16 int 2
int.Size32 int 4
int.Size64 int 8

Derived Classes

See Also

 


int()

public method int(int InitValue = 0)

Parameters

InitValue

Initial value for the integer object, with a default of zero.

Return Value

None

Description

This is one of the constructors for the 'int' class, invoked automatically by the VM during dynamic allocation of an integer object, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of integer variables.

 

This particular constructor takes an integer as a parameter to initialize the object. A default of zero is used if the parameter is not provided.

 

int Class


int()

public method int(float InitValue)

Parameters

InitValue

Initial value specified as a floating point number.

Return Value

None

Description

This is one of the constructors for the 'int' class, invoked automatically by the VM during dynamic allocation of an integer object, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of integer variables.

 

This particular constructor takes a floating point value as a parameter for initialization. The floating poi nt number is converted to an integer and used to initialize the new integer object. The string to integer conversion follows the same rules as the 'float.Int()' method.

 

int Class


int()

public method int(string InitValue)

Parameters

InitValue

Initial value specified as a string.

Return Value

None

Description

This is one of the constructors for the 'int' class, invoked automatically by the VM during dynamic allocation of an integer object, if the constructor arguments match this method. It is only available for dynamic allocation and not for initialization of integer variables.

 

This particular constructor takes a string as a parameter for initialization. The string is converted to an integer and used to initialize the new integer object. The string to integer conversion follows the same rules as the 'string.Int()' method.

 

int Class


Str()

public method<string> Str(string Format = "I")

Parameters

Format

Format string to control size and value of the resulting string with a default of "I"

Return Value

Returns the string representation of the integer

Description

This instance method converts the internal integer value into a string based on the specified format string. The format string is a combination of a single letter and an optional number (e.g. "I" or "B10").

 

The letter is used to indicate how the integer is represented, and can be entered as lowercase or uppercase.

 

    - 'I' or 'D' for "decimal" (base 10)

    - 'B' for "binary" (base 2)

    - 'O' for "octal" (base 8)

    - 'H' or 'X' for "hexadecimal" (base 16).

 

The number specifies the length of the string. If no length is specified, the "natural length" is used based on the size of the integer value (e.g. an int value of "100" has a natural length of 3). If the length is specified and it exceeds the natural length, the return string will be padded with spaces at the end.

 

int Class


IntStr()

public method<string> IntStr(int Value,string Format = "I")

Parameters

Value

Integer value to be converted to a string

Format

Format string to control size and value of the resulting string with a default of "I"

Return Value

Returns the string representation of the integer

Description

This global method converts the specified integer value into a string based on the specified format string. The format string is a combination of a single letter and an optional number. Refer to the description of the 'int.Str()' method for a description of the the syntax rules for the format string.

 

Global Method


CompilerIntStr()

public method<string> compiler CompilerIntStr(int Value,string Format = "I")

Parameters

Value

Integer value to be converted to a string

Format

Format string to control size and value of the resulting string with a default of "I"

Return Value

Returns the string representation of the integer

Description

This compiler method converts the specified integer value into a string based on the specified format string. The format string is a combination of a single letter and an optional number. Refer to the description of the 'int.Str()' method for a description of the the syntax rules for the format string.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Char()

public method<string> Char()

Parameters

None

Return Value

Returns a string containing the ASCII character for the decimal value

Description

This instance method determines the ASCII character corresponding to the decimal integer value in the object (0-255). The string returned from the method contains only the ASCII character, so it will have a length of one.

 

int Class


IntChar()

public method<string> IntChar(int DecimalValue)

Parameters

DecimalValue

The ASCII decimal value for which the character is being requested

Return Value

Returns a string containing the ASCII character for the decimal value

Description

This global method determines the ASCII character corresponding to the specified decimal integer value (0-255). The string returned from the method contains only the ASCII character, so it will have a length of one.

 

Global Method


CompilerIntChar()

public method<string> compiler CompilerIntChar(int DecimalValue)

Parameters

DecimalValue

The ASCII decimal value for which the character is being requested

Return Value

Returns a string containing the ASCII character for the decimal value

Description

This compiler method determines the ASCII character corresponding to the specified decimal integer value (0-255). The string returned from the method contains only the ASCII character, so it will have a length of one.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Float()

public method<float> Float()

Parameters

None

Return Value

Returns the floating point representation of the integer

Description

This instance method converts the internal integer value into a floating point representation and returns it. For most integer values, it will be an exact conversion. However, for extremely large integer values (roughly > 10**16), there will be a slight loss of precision in the conversion, but it is only a tiny fraction of a percent difference.

 

int Class


IntFloat()

public method<float> IntFloat(int Value)

Parameters

Value

Integer value to be converted to floating point

Return Value

Returns the floating point representation of the integer

Description

This global method converts the specified integer value into a floating point representation and returns it. For most integer values, it will be an exact conversion. However, for extremely large integer values (roughly > 10**16), there will be a slight loss of precision in the conversion, but it is only a tiny fraction of a percent difference.

 

Global Method


CompilerIntFloat()

public method<float> compiler CompilerIntFloat(int Value)

Parameters

Value

Integer value to be converted to floating point

Return Value

Returns the floating point representation of the integer

Description

This compiler method converts the specified integer value into a floating point representation and returns it. For most integer values, it will be an exact conversion. However, for extremely large integer values (roughly > 10**16), there will be a slight loss of precision in the conversion, but it is only a tiny fraction of a percent difference.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Inc()

public method<int> Inc()

Parameters

None

Return Value

Returns the result of the increment operation

Description

This instance method increments the internal integer value and returns the result. This operation modifies the internal integer object. If the operation would cause an overflow, an OverflowException event is fired.

 

int Class


Inc()

public method<int> Inc(int Value)

Parameters

Value

Integer value to be incremented

Return Value

Returns the result of the increment operation

Description

This global method increments the specified integer value and returns the result. This operation does not modify the source integer object. If the operation would cause an overflow, an OverflowException event is fired.

 

Global Method


CompilerInc()

public method<int> compiler CompilerInc(int ref Value)

Parameters

Value

Reference to integer object to receive the incremented value

Return Value

Returns the result of the increment operation

Description

This compiler method increments the integer value specified by the int reference and returns the result. This operation modifies the source integer object. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Dec()

public method<int> Dec()

Parameters

None

Return Value

Returns the result of the decrement operation

Description

This instance method decrements the internal integer value and returns the result. This operation modifies the internal integer object. If the operation would cause a negative overflow, an OverflowException event is fired.

 

int Class


Dec()

public method<int> Dec(int Value)

Parameters

Value

Integer value to be incremented

Return Value

Returns the result of the decrement operation

Description

This global method decrements the specified integer value and returns the result. This operation does not modify the source integer object. If the operation would cause a negative overflow, an OverflowException event is fired.

 

Global Method


CompilerDec()

public method<int> compiler CompilerDec(int ref Value)

Parameters

Value

Reference to integer object to receive the decremented value

Return Value

Returns the result of the decrement operation

Description

This compiler method decrements the integer value specified by the int reference and returns the result. This operation modifies the source integer object. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Add()

public method<int> Add(int Value)

Parameters

Value

Integer value to be added to the internal integer object

Return Value

Returns the result of the addition operation

Description

This instance method adds the specified value to the internal integer value and returns the result. This operation modifies the internal integer object. If the operation would cause an overflow, an OverflowException event is fired.

 

int Class


Add()

public method<int> Add(int Value1,int Value2)

Parameters

Value1

Integer value to be used in the addition

Value2

Integer value to be used in the addition

Return Value

Returns the result of the addition operation

Description

This global method adds the two incoming integer values and returns the result. This operation does not modify the source integer objects. If the operation would cause an overflow, an OverflowException event is fired.

 

This method emulates the '+' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerAdd()

public method<int> compiler CompilerAdd(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to be used in addition

Value2

Integer value to be used in the addition

Return Value

Returns the result of the addition operation

Description

This compiler method adds the two incoming integer values and returns the result. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Sub()

public method<int> Sub(int Value)

Parameters

Value

Integer value to be subtracted from the internal integer object

Return Value

Returns the result of the subtraction operation

Description

This instance method subtracts the specified value from the internal integer value and returns the result. This operation modifies the internal integer object. If the operation would cause a negative overflow, an OverflowException event is fired.

 

int Class


Sub()

public method<int> Sub(int Value1,int Value2)

Parameters

Value1

Integer value to be used in the subtraction

Value2

Integer value to be used in the subtraction

Return Value

Returns the result of the subtraction operation

Description

This global method subtracts Value2 from Value1 and returns the result. This operation does not modify the source integer objects. If the operation would cause a negative overflow, an OverflowException event is fired.

 

This method emulates the '-' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerSub()

public method<int> compiler CompilerSub(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to be used in the subtraction

Value2

Integer value to be used in the subtraction

Return Value

Returns the result of the subtraction operation

Description

This compiler method subtracts Value2 from the object referenced by Value1 and returns the result. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Mult()

public method<int> Mult(int Value)

Parameters

Value

Integer value to multiply the internal integer object by

Return Value

Returns the result of the multiplication operation

Description

This instance method multiplies the internal integer value by the specified value and returns the result. This operation modifies the internal integer object. If the operation would cause an overflow, an OverflowException event is fired.

 

int Class


Mult()

public method<int> Mult(int Value1,int Value2)

Parameters

Value1

Integer value to be used in the multiplication

Value2

Integer value to be used in the multiplication

Return Value

Returns the result of the multiplication operation

Description

This global method multiplies the two incoming integer values and returns the result. This operation does not modify the source integer objects. If the operation would cause an overflow, an OverflowException event is fired.

 

This method emulates the '*' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerMult()

public method<int> compiler CompilerMult(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to be used in the multiplication

Value2

Integer value to be used in the multiplication

Return Value

Returns the result of the multiplication operation

Description

This compiler method multiplies the two incoming integer values and returns the result. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Div()

public method<int> Div(int Value)

Parameters

Value

Integer value to divide the internal integer object by

Return Value

Returns the result of the division operation

Description

This instance method divides the internal integer value by the specified value and returns the result. This operation modifies the internal integer object. If the operation would cause a divide by zero, a DivByZeroException event is fired.

 

int Class


Div()

public method<int> Div(int Value1,int Value2)

Parameters

Value1

Integer value to be used in the division

Value2

Integer value to be used in the division

Return Value

Returns the result of the division operation

Description

This global method divides the first integer value by the second integer value and returns the result. This operation does not modify the source integer objects. If the operation would cause a divide by zero, a DivByZeroException event is fired.

 

This method emulates the '/' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerDiv()

public method<int> compiler CompilerDiv(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to be used in the division

Value2

Integer value to be used in the division

Return Value

Returns the result of the division operation

Description

This compiler method divides the first integer value by the second integer value and returns the result. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Mod()

public method<int> Mod(int Value)

Parameters

Value

Integer value to divide the internal integer object by

Return Value

Returns the modulus (remainder) of the division operation

Description

This instance method divides the internal integer value by the specified value and returns the remainder as the result. This operation modifies the internal integer object. If the operation would cause a divide by zero, a DivByZeroException event is fired.

 

int Class


Mod()

public method<int> Mod(int Value1,int Value2)

Parameters

Value1

Integer value to be used in the division

Value2

Integer value to be used in the division

Return Value

Returns the modulus (remainder) of the division operation

Description

This global method divides the first integer value by the second integer value and returns the remainder of the result. This operation does not modify the source integer objects. If the operation would cause a divide by zero, a DivByZeroException event is fired.

 

This method emulates the '%' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerMod()

public method<int> compiler CompilerMod(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to be used in the division

Value2

Integer value to be used in the division

Return Value

Returns the modulus (remainder) of the division operation

Description

This compiler method divides the first integer value by the second integer value and returns the remainder of the result. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Pow()

public method<int> Pow(int Value)

Parameters

Value

Integer value to use as exponent in power operation

Return Value

Returns the result of the exponentation operation

Description

This instance method raises the internal integer value to the power specified by Value and returns the result. This operation modifies the internal integer object. If the operation would cause an overflow, an OverflowException event is fired.

 

int Class


Pow()

public method<int> Pow(int Value1,int Value2)

Parameters

Value1

Integer value to use as base in power operation

Value2

Integer value to use as exponent in power operation

Return Value

Returns the result of the exponentation operation

Description

This global method raises the first integer value to the power of the second integer. This operation does not modify the source integer objects. If the operation would cause an overflow, an OverflowException event is fired.

 

This method emulates the '**' operator, and is included mainly for consistency and completeness.

 

Global Method


CompilerPow()

public method<int> compiler CompilerPow(int ref Value1,int Value2)

Parameters

Value1

Reference to integer object to use as base in power operation

Value2

Integer value to use as exponent in power operation

Return Value

Returns the result of the exponentation operation

Description

This global method raises the first integer value to the power of the second integer. This operation also modifies the integer object referenced by Value1 with the new value. If the operation would cause an overflow, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


ShiftLeft()

public method<int> ShiftLeft(int Value)

Parameters

Value

Integer value to specify number of bits to shift

Return Value

Returns the result of the shift left operation

Description

This instance method performs a bit-wise shift left operation and returns the result. The incoming value specifies the number of bits to shift to the left. Bits vacated by the operation are filled with zero. This operation modifies the internal integer object. If Value is negative or greater than 64, a BadArgException event is fired.

 

int Class


ShiftLeft()

public method<int> ShiftLeft(int Value1,int Value2)

Parameters

Value1

Source integer for shift operation

Value2

Number of bits to shift to the left

Return Value

Returns the result of the shift left operation

Description

This global method performs a bit-wise shift left operation using the two incoming integer values and returns the result. Bits vacated by the operation are filled with zero. This operation does not modify the incoming integer objects. If Value2 is negative or greater than 64, a BadArgException event is fired.

 

Global Method


CompilerShiftLeft()

public method<int> compiler CompilerShiftLeft(int Value1,int Value2)

Parameters

Value1

Source integer for shift operation

Value2

Number of bits to shift to the left

Return Value

Returns the result of the shift left operation

Description

This compiler method performs a bit-wise shift left operation using the two incoming integer values and returns the result. Bits vacated by the operation are filled with zero. This operation does not modify the incoming integer objects. If Value2 is negative or greater than 64, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


ShiftRight()

public method<int> ShiftRight(int Value)

Parameters

Value

Integer value to specify number of bits to shift

Return Value

Returns the result of the shift right operation

Description

This instance method performs a bit-wise shift right operation and returns the result. The incoming value specifies the number of bits to shift to the right. Bits vacated by the operation are filled with zero. This operation modifies the internal integer object. If Value is negative or greater than 64, a BadArgException event is fired.

 

int Class


ShiftRight()

public method<int> ShiftRight(int Value1,int Value2)

Parameters

Value1

Source integer for shift operation

Value2

Number of bits to shift to the right

Return Value

Returns the result of the shift right operation

Description

This global method performs a bit-wise shift right operation using the two incoming integer values and returns the result. Bits vacated by the operation are filled with zero. This operation does not modify the incoming integer objects. If Value2 is negative or greater than 64, a BadArgException event is fired.

 

Global Method


CompilerShiftRight()

public method<int> compiler CompilerShiftRight(int Value1,int Value2)

Parameters

Value1

Source integer for shift operation

Value2

Number of bits to shift to the right

Return Value

Returns the result of the shift right operation

Description

This compiler method performs a bit-wise shift right operation using the two incoming integer values and returns the result. Bits vacated by the operation are filled with zero. This operation does not modify the incoming integer objects. If Value2 is negative or greater than 64, the operation is not performed.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Abs()

public method<int> Abs()

Parameters

None

Return Value

Returns the absolute value of the integer object

Description

This instance method takes the absolute value of the internal integer value and returns the result. This operation modifies the internal integer object.

 

int Class


Abs()

public method<int> Abs(int Value)

Parameters

Value

Source integer for absolute value operation

Return Value

Returns the absolute value of the integer object

Description

This global method takes the absolute value of the specified integer value and returns the result. This operation does not modify the source integer object.

 

Global Method


CompilerAbs()

public method<int> compiler CompilerAbs(int Value)

Parameters

Value

Source integer for absolute value operation

Return Value

Returns the absolute value of the integer object

Description

This compiler method takes the absolute value of the specified integer value and returns the result. This operation does not modify the source integer object.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitOr()

public method<int> BitOr(int Value)

Parameters

Value

Integer value to be OR'ed with the internal integer object

Return Value

Returns the result of the bitwise OR operation

Description

This instance method performs a bitwise OR operation with the internal integer value and the incoming value and returns the result. This operation modifies the internal integer object.

 

int Class


BitOr()

public method<int> BitOr(int Value1,int Value2)

Parameters

Value1

Integer value to use in OR operation

Value2

Integer value to be OR'ed with Value1

Return Value

Returns the result of the bitwise OR operation

Description

This global method performs a bitwise OR operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Global Method


CompilerBitOr()

public method<int> compiler CompilerBitOr(int Value1,int Value2)

Parameters

Value1

Integer value to use in OR operation

Value2

Integer value to be OR'ed with Value1

Return Value

Returns the result of the bitwise OR operation

Description

This compiler method performs a bitwise OR operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitAnd()

public method<int> BitAnd(int Value)

Parameters

Value

Integer value to be AND'ed with the internal integer object

Return Value

Returns the result of the bitwise ANDoperation

Description

This instance method performs a bitwise AND operation with the internal integer value and the incoming value and returns the result. This operation modifies the internal integer object.

 

int Class


BitAnd()

public method<int> BitAnd(int Value1,int Value2)

Parameters

Value1

Integer value to use in AND operation

Value2

Integer value to be AND'ed with Value1

Return Value

Returns the result of the bitwise AND operation

Description

This global method performs a bitwise AND operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Global Method


CompilerBitAnd()

public method<int> compiler CompilerBitAnd(int Value1,int Value2)

Parameters

Value1

Integer value to use in AND operation

Value2

Integer value to be AND'ed with Value1

Return Value

Returns the result of the bitwise AND operation

Description

This compiler method performs a bitwise AND operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitXOr()

public method<int> BitXOr(int Value)

Parameters

Value

Integer value to be XOR'ed with the internal integer object

Return Value

Returns the result of the bitwise XOR operation

Description

This instance method performs a bitwise XOR operation with the internal integer value and the incoming value and returns the result. This operation modifies the internal integer object.

 

int Class


BitXOr()

public method<int> BitXOr(int Value1,int Value2)

Parameters

Value1

Integer value to use in XOR operation

Value2

Integer value to be XOR'ed with Value1

Return Value

Returns the result of the bitwise XOR operation

Description

This global method performs a bitwise XOR operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Global Method


CompilerBitXOr()

public method<int> compiler CompilerBitXOr(int Value1,int Value2)

Parameters

Value1

Integer value to use in XOR operation

Value2

Integer value to be XOR'ed with Value1

Return Value

Returns the result of the bitwise XOR operation

Description

This compiler method performs a bitwise XOR operation using the two incoming integer values and returns the result. This operation does not modify the source integer objects.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitNot()

public method<int> BitNot()

Parameters

None

Return Value

Returns the result of the bitwise NOT operation

Description

This instance method performs a bitwise NOT operation on the internal integer value and returns the result. This operation modifies the internal integer object.

 

int Class


BitNot()

public method<int> BitNot(int Value)

Parameters

Value

Integer value to use in NOT operation

Return Value

Returns the result of the bitwise NOT operation

Description

This global method performs a bitwise NOT operation on the incoming integer value and returns the result. This operation does not modify the source integer object.

 

Global Method


CompilerBitNot()

public method<int> compiler CompilerBitNot(int Value)

Parameters

Value

Integer value to use in NOT operation

Return Value

Returns the result of the bitwise NOT operation

Description

This compiler method performs a bitwise NOT operation on the incoming integer value and returns the result. This operation does not modify the source integer object.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitOn()

public method<int> BitOn(int BitPosition)

Parameters

BitPosition

One based bit position (1 - 64) to turn on

Return Value

Turns the specified bit ON and returns the result of the operation.

Description

This instance method modifies its internal integer value by turning ON a specific bit, speciified by the one based bit position from 1 to 64. It then returns the result of the operation.

 

int Class


BitOn()

public method<int> BitOn(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn on

Return Value

Turns the specified bit ON and returns the result of the operation

Description

This global method performs a bitwise operation on the incoming integer value and returns the result. It turns ON the specified bit given by the one based bit position from 1 - 64. This operation does not modify the source integer object.

 

Global Method


CompilerBitOn()

public method<int> compiler CompilerBitOn(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn on

Return Value

Turns the specified bit ON and returns the result of the operation

Description

This compiler method performs a bitwise operation on the incoming integer value and returns the result. It turns ON the specified bit given by the one based bit position from 1 - 64. This operation does not modify the source integer object.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitOff()

public method<int> BitOff(int BitPosition)

Parameters

BitPosition

One based bit position (1 - 64) to turn off

Return Value

Turns the specified bit OFF and returns the result of the operation.

Description

This instance method modifies its internal integer value by turning OFF a specific bit, speciified by the one based bit position from 1 to 64. It then returns the result of the operation.

 

int Class


BitOff()

public method<int> BitOff(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn off

Return Value

Turns the specified bit OFF and returns the result of the operation

Description

This global method performs a bitwise operation on the incoming integer value and returns the result. It turns OFF the specified bit given by the one based bit position from 1 - 64. This operation does not modify the source integer object.

 

Global Method


CompilerBitOff()

public method<int> compiler CompilerBitOff(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn off

Return Value

Turns the specified bit OFF and returns the result of the operation

Description

This compiler method performs a bitwise operation on the incoming integer value and returns the result. It turns OFF the specified bit given by the one based bit position from 1 - 64. This operation does not modify the source integer object.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitTest()

public method<int> BitTest(int BitPosition)

Parameters

BitPosition

One based bit position (1 - 64) to turn off

Return Value

Tests the integer to determine if the specified bit position is ON (true) or OFF (false)

Description

This instance method returns TRUE if the specified bit position is turned ON in the integer value and returns false if the bit position is OFF.

 

int Class


BitTest()

public method<int> BitTest(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn off

Return Value

Tests the integer to determine if the specified bit position is ON (true) or OFF (false)

Description

This global method returns TRUE if the specified bit position is turned ON in the integer value and returns false if the bit position is OFF.

 

Global Method


CompilerBitTest()

public method<int> compiler CompilerBitTest(int Value, int BitPosition)

Parameters

Value

Integer value to use in the operation

BitPosition

One based bit position (1 - 64). to turn off

Return Value

Tests the integer to determine if the specified bit position is ON (true) or OFF (false)

Description

This compiler method returns TRUE if the specified bit position is turned ON in the integer value and returns false if the bit position is OFF.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


BitStr()

public method<string> BitStr(bool PadWithZeroes = true)

Parameters

PadWithZeroes

Pad result to 64 characters with preceding zeroes

Return Value

Returns a bit string representation of the integer value using zeroes and ones.

Description

This instance method returns a bit string of zeroes and ones which represents the individual bit values within the integer. The most significant bits are on the left (start of string) and the least significant bits are on the right (end of string). The string can be up to 64 characters in length.

 

int Class


BitStr()

public method<string> BitStr(int Value, bool PadWithZeroes = true)

Parameters

Value

Integer value to use in the operation

PadWithZeroes

Pad result to 64 characters with preceding zeroes

Return Value

Returns a bit string representation of the integer value using zeroes and ones.

Description

This global method returns a bit string of zeroes and ones which represents the individual bit values within the integer. The most significant bits are on the left (start of string) and the least significant bits are on the right (end of string). The string can be up to 64 characters in length.

 

Global Method


CompilerBitStr()

public method<string> compiler CompilerBitStr(int Value, bool PadWithZeroes = true)

Parameters

Value

Integer value to use in the operation

PadWithZeroes

Pad result to 64 characters with preceding zeroes

Return Value

Returns a bit string representation of the integer value using zeroes and ones.

Description

This compiler method returns a bit string of zeroes and ones which represents the individual bit values within the integer. The most significant bits are on the left (start of string) and the least significant bits are on the right (end of string). The string can be up to 64 characters in length.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


ValidInt()

public method<bool> ValidInt(SmallInt IntSize, bool IsSigned = true)

Parameters

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer range

IsSigned

This flag works with the SmallInt enumeration value to determine the acceptable range

Return Value

Returns true if integer value is within specified range and false if not.

Description

This instance method compares the value of the 64 signed integer to determine if it fits within the valid range of other possible integer sizes (1, 2 and 4 bytes). It also uses the "is signed" flag to help define the acceptable range for the integer value. If the integer value is within the acceptable range based on the value of the incoming parameters, the function returns returns true, otherwise it returns false.

 

The size of integer to consider is specified by the SmallInt enumeration value. Possible values are SmallInt.Int8, SmallInt.Int16 and SmallInt.Int32, to indicate 1, 2 and 4 byte integers, respectively. Refer to the description of the SmallInt enumeration at the top of this page, which includes the integer value's lower and upper limits for each of the SmallInt sizes, with signed and unsigned attributes.

 

int Class


ValidInt()

public method<bool> ValidInt(int Value, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

Integer value to use in the operation

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag works with the SmallInt enumeration value to determine the acceptable range

Return Value

Returns true if integer value is within specified range and false if not.

Description

This global method compares the value of the 64 signed integer to determine if it fits within the valid range of other possible integer sizes (1, 2 and 4 bytes). It also uses the "is signed" flag to help define the acceptable range for the integer value. If the integer value is within the acceptable range based on the value of the incoming parameters, the function returns returns true, otherwise it returns false.

 

The size of integer to consider is specified by the SmallInt enumeration value. Possible values are SmallInt.Int8, SmallInt.Int16 and SmallInt.Int32, to indicate 1, 2 and 4 byte integers, respectively. Refer to the description of the SmallInt enumeration at the top of this page, which includes the integer value's lower and upper limits for each of the SmallInt sizes, with signed and unsigned attributes.

 

Global Method


CompilerValidInt()

public method<bool> compiler CompilerValidInt(int Value, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

Integer value to use in the operation

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag works with the SmallInt enumeration value to determine the acceptable range

Return Value

Returns true if integer value is within specified range and false if not.

Description

This compiler method compares the value of the 64 signed integer to determine if it fits within the valid range of other possible integer sizes (1, 2 and 4 bytes). It also uses the "is signed" flag to help define the acceptable range for the integer value. If the integer value is within the acceptable range based on the value of the incoming parameters, the function returns returns true, otherwise it returns false.

 

The size of integer to consider is specified by the SmallInt enumeration value. Possible values are SmallInt.Int8, SmallInt.Int16 and SmallInt.Int32, to indicate 1, 2 and 4 byte integers, respectively. Refer to the description of the SmallInt enumeration at the top of this page, which includes the integer value's lower and upper limits for each of the SmallInt sizes, with signed and unsigned attributes.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Int()

public method<int> Int(int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the value of the small integer which was extracted from the full integer.

Description

This instance method extracts a "small integer" (1, 2 or 4 bytes) from within the 64 signed integer, and returns it to the caller. A one based starting position is used to determine where the extraction will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag specified how to interpret the small integer.

 

int Class


Int()

public method<int> Int(int Value, int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

Integer value to use in the operation

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the value of the small integer which was extracted from the full integer.

Description

This global method extracts a "small integer" (1, 2 or 4 bytes) from within the 64 signed integer, and returns it to the caller. A one based starting position is used to determine where the extraction will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag specified how to interpret the small integer.

 

Global Method


CompilerInt()

public method<int> compiler CompilerInt(int Value, int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

Integer value to use in the operation

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the value of the small integer which was extracted from the full integer.

Description

This compiler method extracts a "small integer" (1, 2 or 4 bytes) from within the 64 signed integer, and returns it to the caller. A one based starting position is used to determine where the extraction will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag specified how to interpret the small integer.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Ovr()

public method<int> IntOvr(int OverlayValue, int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

OverlayValue

Integer value to be overlaid directly onto the 64 bit integer value

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the new integer value resulting from the integer overlay operation

Description

This instance method overlays (writes) a "small integer" (1, 2 or 4 bytes) onto the 64 signed integer, and returns the resultant value to the caller. The instance value is modified as a result of this operation. A one based starting position is used to determine where the overlay will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag defines the valid range of the small integer value.

 

Note that error checking is performed on the starting position and the SmallInt enumeration value. If the starting position is not valid (must be between 1 and 8) or the starting position is too high given the SmallInt enumeration value, an error will occur. In addition, the incoming overlay value must fit within the range specified by the IntSize enumeration and the "is signed" flag, or an error will occur. If any type of input validation error occurs, a math exception is created and fired. If the error is based on a bad starting position, it fires a domain exception and if the overlay value does not fit wiithin the specified small integer size/range, it fires an overflow exception.

 

For instance, a start position of 6 with an IntType of SmallInt.Int32 (4 bytes) would cause the overlay (write) operation to exceed the 8 byte boundary by one byte. If this type of input validation occurs, it will be treated as a math domain error, and an exception will be created and fired.

 

int Class


IntOvr()

public method<int> IntOvr(int Value, int OverlayValue, int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

64 bit Integer value to use in the operation

OverlayValue

Integer value to be overlaid directly onto the 64 bit integer value

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the new integer value resulting from the integer overlay operation

Description

This global method overlays (writes) a "small integer" (1, 2 or 4 bytes) onto the 64 signed integer, and returns the resultant value to the caller. A one based starting position is used to determine where the overlay will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag defines the valid range of the small integer value.

 

Note that error checking is performed on the starting position and the SmallInt enumeration value. If the starting position is not valid (must be between 1 and 8) or the starting position is too high given the SmallInt enumeration value, an error will occur. In addition, the incoming overlay value must fit within the range specified by the IntSize enumeration and the "is signed" flag, or an error will occur. If any type of input validation error occurs, a math exception is created and fired. If the error is based on a bad starting position, it fires a domain exception and if the overlay value does not fit wiithin the specified small integer size/range, it fires an overflow exception.

 

For instance, a start position of 6 with an IntType of SmallInt.Int32 (4 bytes) would cause the overlay (write) operation to exceed the 8 byte boundary by one byte. If this type of input validation occurs, it will be treated as a math domain error, and an exception will be created and fired.

 

Global Method


CompilerIntOvr()

public method<int> compiler CompilerIntOvr(int Value, int StartPosition, SmallInt IntSize, bool IsSigned = true)

Parameters

Value

Integer value to use in the operation

StartPosition

One based starting position within the 8 byte integer value (1 (least significant) - 8 (most significant))

IntSize

Enumeration which specifies to use an 8 bit, 16 bit or 32 bit integer

IsSigned

This flag indicates whether the value should be treated as signed or unsigned

Return Value

Returns the value of the small integer which was extracted from the full integer.

Description

This compiler method overlays (writes) a "small integer" (1, 2 or 4 bytes) onto the 64 signed integer, and returns the resultant value to the caller. A one based starting position is used to determine where the overlay will occur, the SmallInt enumeration value specifies the size, and the "is signed" flag defines the valid range of the small integer value.

 

Note that error checking is performed on the starting position and the SmallInt enumeration value. If the starting position is not valid (must be between 1 and 8) or the starting position is too high given the SmallInt enumeration value, an error will occur. In addition, the incoming overlay value must fit within the range specified by the IntSize enumeration and the "is signed" flag, or an error will occur. If any type of input validation error occurs, no overlay/write operation is performed, and the original value is returned to the caller.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method


Random()

public method<int> shared Random(int LowLimit, int HighLimit)

Parameters

LowLimit

Low end of range for random number

HighLimit

High end of range for random number

Return Value

Returns a random number within the range

Description

This shared method returns a pseudo-random integer within the range specified by the low limit and high limit (inclusive) and returns the result.

 

int Class


RandomInt()

public method<int> RandomInt(int LowLimit, int HighLimit)

Parameters

LowLimit

Low end of range for random number

HighLimit

High end of range for random number

Return Value

Returns a random number within the range

Description

This global method returns a pseudo-random integer within the range specified by the low limit and high limit (inclusive) and returns the result.

 

Global Method


CompilerRandomInt()

public method<int> compiler CompilerRandomInt(int LowLimit, int HighLimit)

Parameters

LowLimit

Low limit of the range

HighLimit

High limit of the range

Return Value

Returns a random number within the range

Description

This compiler method returns a pseudo-random integer between the specified low limit and high limit (inclusive) and returns the result.

 

Compiler methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Compiler methods cannot be called from normal (non-compiler) methods.

 

Compiler Method

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec