Show / Hide Table of Contents

Class Long

Longs are positive and negative whole 64-bit unsigned numbers without decimals. If you need to work with decimals, use the Float data type. To represent a long number in the code as a literal, suffix it with an "L", for example, "Long l = 576460752303423488L;"

Syntax

Constructors

Long()

Default constructor.

Declaration
Long Long()
Returns
Type Description
Long

Long(Integer)

Pass a value to copy into a new object.

Declaration
Long Long(Long value)
Parameters
Type Name Description
Long value

Long object.

Returns
Type Description
Long

Long(Integer)

Pass a value to copy into a new object.

Declaration
Long Long(Integer value)
Parameters
Type Name Description
Integer value

Integer object.

Returns
Type Description
Long

Methods

getHighInteger()

Returns the high 32-bit Integer of the Long.

Declaration
Integer getHighInteger()
Returns
Type Description
Integer
Examples
Long c = 576460752303423488L;
print(c.getHighInteger().toString());

getLowInteger()

Returns the low 32-bit Integer of the Long.

Declaration
Integer getLowInteger()
Returns
Type Description
Integer
Examples
Long c = 576460752303423488L;
print(c.getLowInteger().toString());

isNull()

Returns true if it has no value and false if it does.

Declaration
Bool isNull()
Returns
Type Description
Bool
Remarks

A NULL/NUL/NIL Long is different from zero, in that it is conceptually without a value. However, when a null Long is used naively, CRMScript is usually forgiving and interprets it as zero.

Examples
Long i;
printLine(i.isNull().toString());
i = 0;
printLine(i.isNull().toString());

The first output will be true because we haven't initialized i yet. The next output will be false because i now has the value 0.

toString()

Converts a numeric value to its string representation.

One of the most frequently used methods, typically when you are going to output something.
Declaration
String toString()
Returns
Type Description
String
Examples
Long c = 576460752303423488L;
String s = c.toString();
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top