1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00
QB64-PE/internal/help/MKL$_111$.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

33 lines
1.2 KiB
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:14:47}}
The [[MKL$]] function encodes a [[LONG]] numerical value into a 4-byte [[ASCII]] [[STRING]] value.
{{PageSyntax}}
: {{Parameter|result$}} = [[MKL$]]({{Parameter|longVariableOrLiteral&}})
{{PageDescription}}
* {{Parameter|longVariableOrLiteral&}} is converted to four ASCII characters. To see this in action, try {{InlineCode}}PRINT MKL$(12345678){{InlineCodeEnd}}.
* The numerical data usually takes up less bytes than printing the [[LONG]] number to a file.
* [[LONG]] integer values can range from -2147483648 to 2147483647.
* Since the representation of a long number can use up to 10 ASCII characters (ten bytes), writing to a file using [[MKL$]] conversion, and then reading back with the [[CVL]] conversion can save up to 6 bytes of storage space.
* [[CVL]] can convert the value back to a [[LONG]] numerical value.
* [[LONG]] numerical variable values [[PUT]] into a [[BINARY]] file are automatically placed as an MKL$ [[ASCII]] string value.
{{PageExamples}}
See examples in:
* [[SAVEIMAGE]]
* [[SaveIcon32]]
{{PageSeeAlso}}
* [[MKI$]], [[MKS$]], [[MKD$]]
* [[CVD]], [[CVI]], [[CVS]], [[CVL]]
* [[_MK$]], [[_CV]]
{{PageNavigation}}