Divides 64-bit integers.

Int64_Div(yqcnBigInt, yqcnBigInt2 [, nFormat])

Parameters

ycqnBigInt

The first operand of the division.

The parameters can be passed in 4 different formats.
1. As a currency value.
2. As a 8 byte varbinary string.
3. As a string literal e.g. "-1234567890123"
4. As a normal VFP numeric value.

ycqnBigInt2

The second operand of the division.

nFormat (optional)

default = 1

Specifies the format of the return value.

One of the following values.
FormatDescription
1Currency.
2String literal.
38 byte binary string.

Return Value

The result of the division in the requested format.

Remarks

The function raises error 1307 "Cannot divide by 0." if you pass 0 as the divisor.

The function raises error 39 "Numeric overflow. Data was lost." when you divide -9223372036854775808 by -1, since +9223372036854775808
is not in the representable range of a signed 64-bit integer.

The currency value the function returns should only be used with the following functions:
Int64_Add, Int64_Sub, Int64_Mul, Int64_Div, Int64_Mod, Int642Str, WriteInt64, WritePInt64 and WriteRegistryKey.

The VFP currency datatype has an implied decimal point. When you convert a currency value returned from Int_Add, Int64_Sub etc. with MTON() the returned numeric value is not what you might expect, additionally every VFP function will raise error 1988 if the value is –9,223,372,036,854,775,808.

Since this function can return an invalid currency value (–9,223,372,036,854,775,808) you
should use the Q(8) datatype instead of Y to store 64 bit integers in a table.

See Also

Reference

AFontInfo
ASplitStr
Decimals
GetCursorPosEx
Int64_Add
Int64_Mod
Int64_Mul
Int64_Sub