Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB Random Files
Message
From
20/12/1998 06:54:40
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00169177
Message ID:
00169213
Views:
26
>Oh my, looks like I might have to learn VB now....what a sad bunny I have to be now =(
>
>Unless I learn how to convert boolean and double as I have done the others...hoping someone will step in and put me in the right direction now =)

Booleans are trivial; they're a SHORT (2 byte signed integer) that represent FALSE as 0; non-zero values are true. You should be able to convert 1, 2 and 4 byte integer types from VB using the internal CTOBIN() functions in VFP.

Doubles in C are 64 bit floats; high order bit is the sign, followed by a 52 bit mantissa, followed by an 11 bit exponent in excess-1023 format. If I wanted to do this conversion, I'd write a small .DLL in C that took an 8 byte string and returned a double; the internal code would simply recast the 8 bytes as a DOUBLE and pass back the result. I don't know what VB's internal representation of a double looks like, the VB docs show that VB uses a similar Double representation (IOW, it's an 8 byte internal representation.)

It would probably be far less work to write something in VB that spits out a friendlier format, like an SDF or comma-delimited file, since the structure and conversion issues don't cause a problem in VB; there's internal conversion of format done in VB when reading in records of a declared structure.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform