Help Center›FreeBASIC
MKLfunction
Does a binary copy from a Long variable to a String, setting its length to 4 bytes
Syntax
Declare Function MKL ( ByVal number As Long ) As String
Parameters
Return value
Returns a
String with a binary copy of the Long.Description
Does a binary copy from a
Long variable to a String, setting its length to 4 bytes. The resulting string can be read back to a Long by CVL.This function is useful to write numeric values to buffers without using a
Type definition.Remarks
Usage
result = MKL( number )
Dialect Differences
- The string type suffix "$" is required in the -lang qb dialect.
- The string type suffix "$" is optional in the -lang fblite dialect.
- The string type suffix "$" is ignored in the -lang fb dialect, warn only with the -w suffix compile option (or -w pedantic compile option).
Differences from QB
- None
See also
Example
Dim a As Long, b As String
a = 4534
b = MKL(a)
Print a, CVL(b)
Sleep
Reference
- Documented in KeyPgMkl.html