rtos not working...

Discussion in 'AutoCAD' started by kyheulon, Sep 30, 2004.

  1. kyheulon

    kyheulon Guest

    I'm using the following code and I don't get a number with two decimal places... Why?

    (setq a 110.5)
    (setq b (rtos a 2 2))

    I get b set to "110.5" and I need "110.50". What is worse is when I set "a" to 110, I only get "110" and I need "110.00".

    Thanks,
     
    kyheulon, Sep 30, 2004
    #1
  2. kyheulon

    BillZ Guest

    Works here on R2005.

    Bill

    Command: (setq a 110.5)
    110.5

    Command: (rtos a 2 2)
    "110.50

    Command: (rtos a 2 2)
    "110.50"

    Command: units

    Command: (rtos a 2 2)
    "110.50"

    Command: (rtos a 2 3)
    "110.500"

    Command: (rtos a 2 4)
    "110.5000"

    Command: (setq a 110)
    110

    Command: (rtos a 2 2)
    "110.00"
     
    BillZ, Sep 30, 2004
    #2
  3. kyheulon

    kyheulon Guest

    I'm in 2004...
     
    kyheulon, Sep 30, 2004
    #3
  4. kyheulon

    David Bethel Guest

    Look into DIMZIN. -David
     
    David Bethel, Sep 30, 2004
    #4
  5. kyheulon

    kyheulon Guest

    That is it... Thanks a bunch!
     
    kyheulon, Sep 30, 2004
    #5
  6. kyheulon

    Adesu Guest

    Hi David,what other system variable to become influence to Autolisp
    program,beside DIMZIN.
     
    Adesu, Oct 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.