IDL

LONG

LONG

The LONG function returns a result equal to Expression converted to longword integer type.

Examples


If A contains the floating-point value 32000.0, it can converted to a longword integer and stored in the variable B by entering:

B = LONG(A)

Syntax


Result = LONG( Expression[Offset [D1[, ..., D8]]] )

Return Value


Returns a longword integer value or array of the same dimensions as the Expression. If Expression is a complex number, LONG returns the real part.

Arguments


Expression

The expression to be converted to longword integer.

Offset

Offset from beginning of the Expression data area. Specifying this argument allows fields of data extracted from Expression to be treated as longword integer data.

Di

When extracting fields of data, the Di arguments specify the dimensions of the result. If no dimension arguments are given, the result is taken to be scalar.

The Di arguments can be either an array or a series of scalar expressions specifying the dimensions of the result. If a single argument is specified, it can be either a scalar expression or an array of up to eight elements. If multiple arguments are specified, they must all be scalar expressions. Up to eight dimensions can be specified.

When converting from a string argument, it is possible that the string does not contain a valid floating-point value and no conversion is possible. The default action in such cases is to print a warning message and return 0. The ON_IOERROR procedure can be used to establish a statement to be jumped to in case of such errors.

Keywords


Thread Pool Keywords

This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine.

Version History


Original

Introduced

See Also


BYTE, COMPLEX, DCOMPLEX, DOUBLE, FIX, FLOAT, STRING, UINT, ULONG, ULONG64



Notes


This page has no user notes yet. Be the first one!


This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
© 2014 Exelis Visual Information Solutions