Solved

How do I write in IEEE format in VB?

Posted on 2001-08-16
9
406 Views
Last Modified: 2012-06-27
How do you write in IEEE format in VB?
0
Comment
Question by:joesmow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 2

Expert Comment

by:Lunchy
ID: 6395223
<ping>
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 6395264
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

Anthony
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6395346
>How do you write in IEEE format in VB?

Which IEEE format exactly are you looking for?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 38

Expert Comment

by:PaulHews
ID: 6395353
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?
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6395647
mind if I ask what exactly IEEE format is?! I know its probably a stupid question, but I havent a clue what it means...
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 6396821
I may be way off here but i think that VB uses IEEE format does it not ?
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6396911
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.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6399454
Nicely done Anthony.  :) But what was the question about?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6404644
Paul,

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.

Anthony
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 8 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question