How do I write in IEEE format in VB?

How do you write in IEEE format in VB?
Who is Participating?
Anthony PerkinsConnect With a Mentor Commented:
I am not even sure where this is coming from and I really cannot see much use for this these days, but I believe you are looking for something like the old MKI$, MKL$, MKS$, MKD$ functions.  The MK?$ functions convert numeric values to strings by placing the ASCII value of each byte that represents the numeric value into a string.

So for example the following will work for variables of type long (4 bytes)

Private Declare Sub CopyMemory Lib "KERNEL32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)

Private Sub Command1_Click()

Debug.Print MKL(123456)

End Sub

Function MKL(x As Long) As String
Dim Temp As String

Temp = Space$(4)
CopyMemory ByVal Temp, x, 4
MKL = Temp

End Function

>How do you write in IEEE format in VB?

Which IEEE format exactly are you looking for?
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

The reason I ask is because Double variable types are IEEE 64 bit floats.  Singles are IEEE 32-bit floats.  What other type would you be looking for?
mind if I ask what exactly IEEE format is?! I know its probably a stupid question, but I havent a clue what it means...
I may be way off here but i think that VB uses IEEE format does it not ?
Yes Pierre, for single and double, vb follows IEEE specifications for those datatypes.  There are other specifications that he might want, but unless he tells us we won't be able to help.

JonFish, IEEE stands for Institute of Electrical and Electronics Engineers, they design a lot of industry standards for electronics and IT.
Nicely done Anthony.  :) But what was the question about?
Anthony PerkinsCommented:

Who knows!  Talk about a blast from the past.  I have not used those functions in nearly 10 years.  I remember the angst it created some deveopers when they were dropped going from MS Basic to Visual Basic.  Something similar going on now with some archaic functions getting dropped going to VB.NET.

All Courses

From novice to tech pro — start learning today.