long()

Read(277) Label: convert, long integer,

Description:

Convert a string or a number to a 64-bit long integer.

Syntax:

long(stringExp)

long(numberExp)

Note:

The value of parameter stringExp must be a string that consists of a long integer which has 64 bits or less. For a value with more than 64 bits, the result of long(stringExp) is imprecise and its decimal part, if any, will be truncated.

The value of parameter numberExp must be a long integer which has 64 bits or less. For a value with more than 64 bits, the result of long(numberExp) is imprecise.

Parameters:

stringExp

The string expression you want to convert as a long integer.

numberExp

The number you want to convert as a long integer, whose decimal part, if any, will be truncated.

Return value:

A 64-bit long integer

Examples:

long("1234567")

1234567

long(1234567.789)

1234567

Related functions:

float()

int()

decimal()

number()

string()