Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I write in IEEE format in VB?

Posted on 2001-08-16
9
Medium Priority
?
408 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

715 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