Converts data into data of type longlong. There are two syntaxes.
Description
Combines two unsigned longs into a longlong value.
Syntax
LongLong ( lowword, highword )
Argument |
Description |
---|---|
lowword |
An UnsignedLong to be the low word in the longlong |
highword |
An UnsignedLong to be the high word in the longlong |
Return value
LongLong.
Returns the longlong if it succeeds and -1 if an error occurs. If any argument's value is null, LongLong returns null.
Usage
Use LongLong for passing values to external C++ and Java functions.
Examples
These statements convert the UnsignedLongs lLow and lHigh into a longlong value:
UnsignedLong lLow //Low long 32 bits UnsignedLong lHigh //High long 32 bits longlong LLValue //LongLong value 64 bits lLow = 1234567890 lHigh = 3456789012 LLValue = LongLong(lLow, lHigh) MessageBox("LongLong Value", LLValue)
Description
Converts a string whose value is a number into a longlong or obtains a longlong value stored in a blob.
Syntax
LongLong ( stringorblob )
Argument |
Description |
---|---|
stringorblob |
The string you want returned as a longlong or a blob in which the first value is the longlong value. The rest of the contents of the blob is ignored. Stringorblob can also be an Any variable containing a string or blob. |
Return value
LongLong.
Returns the value of stringorblob as a longlong if it succeeds and 0 if stringorblob is not a valid PowerScript number or if it is an incompatible datatype. If stringorblob is null, Long returns null.
Usage
To distinguish between a string whose value is the number 0 and a string whose value is not a number, use the IsNumber function before calling the LongLong function.
Examples
This statement returns 216789987654321 as a longlong:
LongLong("216789987654321")
After assigning blob data from the database to lb_blob, the following example obtains the longlong value stored at position 20 in the blob:
longlong llb_num llb_num = LongLong(BlobMid(lb_blob, 20, 4))
For an example of assigning and extracting values from a blob, see Real.
See also