MKI
Does a binary copy from a `Integer` variable to a `String`, setting its length to 4 bytes
Syntax
`
Declare Function MKI ( ByVal number As Integer ) As String
`
Usage
`
result = MKI[$]( number )
`
Parameters
`number`
A `Integer` variable to binary copy to a `String`.
Return Value
Returns a `String` with a binary copy of the `Integer`.
Description
Does a binary copy from an `Integer` variable to a `String`, setting its length to 4 bytes. The resulting string can be read back to an `Integer` by `CVI`
This function is useful to write numeric values to buffers without using a `Type` definition.
Example
`
Dim a As Integer, b As String
a=4534
b=MKI(a)
Print a, CVI(b)
Sleep
`
Dialect Differences

- In the -lang qb dialect, `MKI` returns a 2-byte-string, since a QB integer is only 16 bits.
- The string type suffix "$" is obligatory in the -lang qb dialect.
- The string type suffix "$" is optional in the -lang fblite and -lang fb dialects.

See also

- `CVI`