Professional Web Applications Themes

convert quad to string - Mac Programming

It sure would be nice to be able to print the decimal representation of a 64-bit number from a C program. Has Apple released anything? A new printf (libSystem) would be nice, but I'm guessing that it would be a headache to integrate a library that Apple hadn't created as a dynamic library. So a separate binary to string function would probably be the most practical (the inverse of strtoq). Is there anything I can use on OSX 2.8? Thank you Geo...

  1. #1

    Default convert quad to string

    It sure would be nice to be able to print the decimal representation of
    a 64-bit number from a C program. Has Apple released anything?

    A new printf (libSystem) would be nice, but I'm guessing that it would
    be a headache to integrate a library that Apple hadn't created as a
    dynamic library. So a separate binary to string function would probably
    be the most practical (the inverse of strtoq). Is there anything I can
    use on OSX 2.8?

    Thank you
    Geo
    Oliver Guest

  2. #2

    Default Re: convert quad to string

    In article <west.earthlink.net>,
    Oliver Sodden <invalid> wrote:
     

    Try %lld as the format specifier. I believe that's the C99 way.

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  3. #3

    Default Re: convert quad to string

    In article <comcast.net>,
    Gregory Weston <com> wrote:
     [/ref]
    .... 

    Thank you, thank you, thank you for not yelling. I certainly deserved
    it. In trying to answer this, I had tried "man printf", and didn't
    notice the rather abbreviated result was for "printf(1)". So then I
    tried a web search, found a nice Linux page, and didn't notice the "q",
    "ll", and "L" were modifiers, not specifiers.
    Oliver Guest

Similar Threads

  1. convert string to safe string before adding to database
    By forums.macromedia.com in forum Macromedia ColdFusion
    Replies: 4
    Last Post: September 1st, 07:24 PM
  2. [PHP] convert string to number
    By Jay in forum PHP Development
    Replies: 2
    Last Post: November 17th, 04:54 PM
  3. convert hexadecimal to string
    By ionel in forum Microsoft SQL / MS SQL Server
    Replies: 4
    Last Post: August 13th, 07:06 PM
  4. Convert string to HTML
    By Paul Ritchie in forum ASP.NET General
    Replies: 1
    Last Post: July 21st, 12:55 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139