CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2005
    Location
    Florida
    Posts
    9

    Smile Conversion of a long!

    How can I convert a long to a string that represents the number in th IEEE language.


    Thanks alot in advanced.

    Regards,

  2. #2
    Join Date
    Nov 2004
    Location
    Rhode Island, USA
    Posts
    29

    Re: Conversion of a long!

    can't you just do

    string var;
    long x=100;
    var ="x";

  3. #3
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Conversion of a long!

    Quote Originally Posted by Doorsdown
    can't you just do

    string var;
    long x=100;
    var ="x";
    Where did you get that? You would end up with a string that holds "x" not "100".
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  5. #5
    Join Date
    Apr 2005
    Posts
    107

    Re: Conversion of a long!

    What is the IEEE Language?

    There are IEEE defined standard representation for floating point numbers, but not longs.

  6. #6
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Conversion of a long!

    Quote Originally Posted by rdrast
    What is the IEEE Language?
    He probably meant IEEE standard, not language...
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  7. #7
    Join Date
    Apr 2005
    Location
    Florida
    Posts
    9

    Smile Re: Conversion of a long!

    Exactly...!!!

    It's not a language, I ment a standar for The Institute of Electrical and Electronics Engineers.

    By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll.


    Regards,

  8. #8
    Join Date
    Jun 2002
    Location
    Moscow, Russia.
    Posts
    2,176

    Re: Conversion of a long!

    Quote Originally Posted by MrSkywalker
    By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll.


    Did you read FAQs suggested by Ejaz?
    "Programs must be written for people to read, and only incidentally for machines to execute."

  9. #9
    Join Date
    Jan 2001
    Posts
    588

    Re: Conversion of a long!

    Quote Originally Posted by MrSkywalker
    Exactly...!!!

    It's not a language, I ment a standar for The Institute of Electrical and Electronics Engineers.

    By the way in VB I use this dll, QPRO32.DLL. However, I thik there should be a way to do this in c++ with out using this dll.


    Regards,
    What they're trying to say is that there isn't a standard IEEE format for displaying a long integer. You might be confused with IEEE floating-point format, which defines how a floating-point quantity is stored as binary data.

  10. #10
    Join Date
    Apr 2005
    Location
    Florida
    Posts
    9

    Smile Re: Conversion of a long!

    Exactly!

    Do you have something that could help me out?

    Thanks a lot.


    Regards,

  11. #11
    Join Date
    Apr 2005
    Posts
    107

    Re: Conversion of a long!

    I'm still confused as to what you are looking for, but if you just want the representation of floating point, see here:

    http://www.psc.edu/general/software/...ieee/ieee.html

  12. #12
    Join Date
    Jan 2001
    Posts
    588

    Re: Conversion of a long!

    Quote Originally Posted by MrSkywalker
    Exactly!

    Do you have something that could help me out?

    Thanks a lot.


    Regards,
    No, we don't. You said that you wanted to know how to print an unsigned long in standard IEEE format. This format does not exist. What do you need then?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured