"nil" to nil

Discussion in 'AutoCAD' started by kemp, Feb 25, 2005.

  1. kemp

    kemp Guest

    Here is a really simple question. How do I change the format of a string
    "nil" to behave like plain old nil?

    Thx - kemp
     
    kemp, Feb 25, 2005
    #1
  2. kemp

    kemp Guest

    Holy cow, that was even simpler than I imagined. All these resources and
    I couldn't find something that simple - thanks!

    kemp
     
    kemp, Feb 25, 2005
    #2
  3. kemp

    Bill DeShawn Guest

    Command: (read "NIL")
    nil

    Command: (read "pop")
    POP

    What's the deal with case?
     
    Bill DeShawn, Feb 26, 2005
    #3
  4. Does this help?

    Command: (type (read "NIL"))
    nil

    Command: (type (read "pop"))
    SYM
     
    Randy Richardson, Feb 26, 2005
    #4
  5. kemp

    Bill DeShawn Guest

    Actually, yes. Nil is a value (or rather an expression of lack of value),
    either numeric or string. So, it appears that symbols are always expressed
    in upper case:
    Command: (read (strcase "pop" T))
    POP
    I can't even force it to display in lower case.
    interesting...
     
    Bill DeShawn, Feb 28, 2005
    #5
  6. kemp

    Zatopek Guest

    Your code is same as (read "POP"),

    I believe what you tried to do was (strcase (read "pop") T).

    And that doesn't work because result is not a string
     
    Zatopek, Feb 28, 2005
    #6
  7. kemp

    Bill DeShawn Guest

    How true it is.
     
    Bill DeShawn, Mar 1, 2005
    #7
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.