Converting an Interger to a Sring

Discussion in 'AutoCAD' started by Scott, Apr 30, 2004.

  1. Scott

    Scott Guest

    Hi,

    I was wondering how I would go about converting an integer to a string? I
    know that atoi converts a string to an int, but is there a way to go back?

    Thanks,
     
    Scott, Apr 30, 2004
    #1
  2. itoa

    --
    R. Robert Bell


    Hi,

    I was wondering how I would go about converting an integer to a string? I
    know that atoi converts a string to an int, but is there a way to go back?

    Thanks,
     
    R. Robert Bell, May 1, 2004
    #2
  3. Jacky Terrien, May 1, 2004
    #3
  4. For these questions I believe that you do sooner looking in the help:

    --

    Instructions:

    1. In AutoCAD: press F1 key

    2. Click in the tab "questions"

    3. search for "atoi"

    4. result:

    Converts a string into an integer
    (atoi string)
    Arguments string A string to be converted into an integer.
    Return Values An integer.
    Examples
    Command: (atoi "97") 97
    Command: (atoi "3") 3
    Command: (atoi "3.9") 3

    See Also The itoa function <<<<<<<<<

    5. Click the itoa link

    ....

    or:

    4b. Click on: Conversion Functions

    5b. Results:

    ( angtof string [mode])
    Converts a string representing an angle into a real
    (floating-point) value in radians

    ( angtos angle [mode [precision]])
    Converts an angular value in radians into a string

    ( ascii string)
    Returns the conversion of the first character of a
    string into its ASCII character code (an integer)

    ( atof string)
    Returns the conversion of a string into a real

    ( atoi string)
    Returns the conversion of a string into an integer

    ( chr integer)
    Returns the conversion of an integer representing
    an ASCII character code into a single-character string

    ( cvunit value from to)
    Converts a value from one unit of measurement to another

    ( distof string [mode])
    Converts a string that represents a real (floating-point)
    value into a real value

    ( itoa int)
    Returns the conversion of an integer into a string

    ( rtos number [mode [precision]])
    Converts a number into a string

    ( trans pt from to [disp])
    Translates a point (or a displacement) from one coordinate
    system to another

    ---


    8. The whole world is observing your laziness.

    9. Cheers


    ________________________________________________

    Marc'Antonio Alessi
    http://xoomer.virgilio.it/alessi
    (strcat "NOT a " (substr (ver) 8 4) " guru.")

    O.S. = XP Pro 2002 Ita - Sp.1
    AutoCAD = 2004 Ita - Sp.1a
    ________________________________________________
     
    Marc'Antonio Alessi, May 1, 2004
    #4
  5. Scott

    favline Guest

    It's common knowledge that asking a question
    is the fastest way to get the answer.

    However, by doing it yourself you'll learn how
    to do things.
     
    favline, May 1, 2004
    #5
  6. Scott

    OLD-CADaver Guest

    It's common knowledge that asking a question is the fastest way to get the answer.<<

    Wading through the help files will answer questions you didn't know to ask.
     
    OLD-CADaver, May 1, 2004
    #6
Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.