1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00
QB64-PE/internal/help/CVSMBF.txt
SteveMcNeill 33adc04fc4 Add temp folder to repo. It's necessary as well!
Just more initial setting on... nothing much to see here.
2022-04-28 13:39:56 -04:00

39 lines
1.5 KiB
Plaintext

The [[CVDMBF]] function decodes a 4-byte [[STRING]] generated by [[MKSMBF$]] (or read from a file) to [[SINGLE]] numeric values.
{{PageSyntax}}
: {{Parameter|result!}} = [[CVSMBF]]({{Parameter|stringData$}})
{{PageDescription}}
* ''CV'' functions ([[CVD]], [[CVS]], [[CVI]], [[CVL]], [[CVDMBF]], [[CVSMBF]]) are used to convert values encoded by ''MK$'' functions ([[MKD$]], [[MKS$]], [[MKI$]], [[MKL$]], [[MKDMBF$]], [[MKSMBF$]]).
* '''QB64''' has [[_CV]] and [[_MK$]] functions which can also deal with extended [[Data types|data types]].
* [[SINGLE]] values can range up to 7 decimal point digits. Decimal point accuracy depends on whole value places taken.
{{PageExamples}}
''Example 1:'' Showcases the reduced space to store an encoded number.
{{CodeStart}}
a! = 700.2213
{{Cl|PRINT}} "Value of a!:"; a!
b$ = {{Cl|MKSMBF$}}(a!)
{{Cl|PRINT}} "Value of a! encoded using MKSMBF$: "; b$
{{Cl|PRINT}} "The string above, decoded using CVSMBF:"; {{Cl|CVDMBF}}(b$)
{{CodeEnd}}
{{OutputStart}}
Value of a!: 700.2213
Value of a# encoded using MKSMBF$: *♫/è
The string above, decoded using CVSMBF: 700.2213
{{OutputEnd}}
:Since the representation of a double-precision number can use up to 7 ASCII characters (seven bytes), writing to a file using [[MKSMBF$]] conversion, and then reading back with the [[CVSMBF]] conversion can save up to 3 bytes of storage space.
{{PageSeeAlso}}
* [[MKD$]], [[MKI$]], [[MKS$]], [[MKL$]], [[MKDMBF$]], [[MKSMBF$]]
* [[CVI]], [[CVS]], [[CVD]], [[CVL]], [[CVDMBF]]
* [[_CV]], [[_MK$]]
{{PageNavigation}}
<