1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00
QB64-website/wiki/CVDMBF.md
2022-12-24 19:12:43 -06:00

1.6 KiB

The CVDMBF function decodes an 8-byte STRING generated by MKDMBF$ (or read from a file) to DOUBLE numeric values.

Syntax

result# = CVDMBF(stringData$)

Description

Example(s)

Showcases the reduced space to store an encoded number.


a# = 77000.24523213
PRINT "Value of a#:"; a#
b$ = MKDMBF$(a#)
PRINT "Value of a# encoded using MKDMBF$: "; b$
PRINT "The string above, decoded using CVDMBF:"; CVDMBF(b$)


Value of a#: 77000.24523213

Value of a# encoded using MKDmbf$:  5─c▼d▬æ

The string above, decoded using CVDMBF: 77000.24523213

Since the representation of a double-precision number can use up to 15 ASCII characters (fifteen bytes), writing to a file using MKDMBF$ conversion, and then reading back with the CVDMBF conversion can save up to 7 bytes of storage space.

See Also