what are the reverse functions of atof( ), atoi( ) and atol( ) ?

Discussion in 'C Programming' started by Sharon, Nov 17, 2003.

  1. Sharon

    Sharon Guest

    hi all

    what are the reverse functions of atof( ), atoi( ) and atol( ) ?
    I want to change sth to string
    thx!
     
    Sharon, Nov 17, 2003
    #1
    1. Advertising

  2. "Sharon" <> wrote:

    > hi all
    >
    > what are the reverse functions of atof( ), atoi( ) and atol( ) ?
    > I want to change sth to string
    > thx!


    Look up sprintf in your reference manual.

    HTH
    Regards
    --
    Irrwahn
    ()
     
    Irrwahn Grausewitz, Nov 17, 2003
    #2
    1. Advertising

  3. Sharon

    Grumble Guest

    Grumble, Nov 17, 2003
    #3
  4. Re: what are the reverse functions of atof( ), atoi( ) and atol() ?

    Sharon wrote:
    > hi all
    >
    > what are the reverse functions of atof( ), atoi( ) and atol( ) ?
    > I want to change sth to string


    sprintf.
    For the hundredth time.
    Didn't you guess that you are not the first person to ask this? That this
    might even be a Frequently Asked Question? What does that suggest to you?



    --
    Martin Ambuhl
     
    Martin Ambuhl, Nov 17, 2003
    #4
  5. Sharon

    CBFalconer Guest

    Sharon wrote:
    >
    > what are the reverse functions of atof( ), atoi( ) and atol( ) ?
    > I want to change sth to string


    How about:

    char whatzit[] = "sth";

    and, in place of atof, atoi, atol consider using strtol, strtod,
    etc. The inverse operations are usually performed by sprintf.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
     
    CBFalconer, Nov 17, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gizmo
    Replies:
    5
    Views:
    432
    llewelly
    Sep 8, 2003
  2. Mike Moum

    string.atoi and string.atol broken?

    Mike Moum, Jan 25, 2005, in forum: Python
    Replies:
    19
    Views:
    680
    Peter Otten
    Jan 27, 2005
  3. Olaf
    Replies:
    0
    Views:
    633
  4. infobahn
    Replies:
    1
    Views:
    341
    Randy Howard
    Feb 15, 2005
  5. atoi/atof

    , Nov 14, 2008, in forum: Perl Misc
    Replies:
    14
    Views:
    477
    Peter J. Holzer
    Nov 23, 2008
Loading...

Share This Page