Syntax

long(*expression*)

**Description
**

The **long** function returns *expression* converted to a long integer.

Table 6-6:longfunction

Data Type Conversion

boolean Ifexpressionis true, the result is 1; otherwise the result is 0.

character string

Expressionis converted to a long integer with the default formatting set. See Chapter 13,

Formatting Data Valuesfor information about default formatting sets. If the string cannot be converted to along integer, the result is 0.

date The result is one plus the number of days between

expressionand January 1, 1800.

integer No conversion required.

long No conversion required.

money

Expressionis converted to a long integer by truncating any fractional part of the basic currency units(pennies in the U.S.).

real

Expressionis converted to a long integer by truncating any fractional part.

time The result is one plus the number of seconds between

expressionand midnight.

**Example
**

long ("1234.5")