From QB64 Wiki
Jump to navigation Jump to search

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


result# = CVDMBF(stringData$)



Example 1: 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

Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page