NAME

cvsmbf, cvdmbf - convert floating point value from old format

SYNOPSIS

v! = cvsmbf(StrExpr)
v# = cvdmbf(StrExpr)

DESCRIPTION

Cvsmbf and cvdmbf convert a floating point value from a string representing a value in the old Microsoft Binary Format.  Cvsmbf converts a single-precision value from a 4-byte string.  Cvdmbf converts a double-precision value from an 8-byte string.  Preferably, these functions are used to implement a one time conversion of floating point data from the old Microsoft Binary Format. 

If it is necessary to convert data back to the old format, use mksmbf$ and mkdmbf$

EXAMPLE

The following program
	open "dbltab" as 1 len=1024
	for i% = 0 to 9
		for j% = 0 to 1024 - 8 step 8
			field #1, j% as dummy$, 8 as a$
			lset a$ = mkd$(cvdmbf(a$))
		next j%
	next i%
	close #1
converts 1280 double-precision numbers from the file "dbltab" in place from the old format to the modern format. 

SEE ALSO

mksmbf$, mkdmbf$

DIAGNOSTICS

If StrExpr is too short, an "Illegal function call" error occurs. 

USAGE NOTES

It is assumed that the modern format is the ANSI/IEEE Standard 754-1985.  The ordering of bytes is, nevertheless, implementation dependent. 

If you donít understand these functions, you probably donít need them. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber