delete an entry from a list

Discussion in 'AutoCAD' started by kemp, Apr 20, 2004.

  1. kemp

    kemp Guest

    I have a basic list of the form:

    ("kitchen" "bedroom" "bathroom" "patio" "pantry" "dining")

    How do you delete a specific entry?

    Say I wanted to remove "patio" and end up with this:
    ("kitchen" "bedroom" "bathroom" "pantry" "dining")

    The logic escapes me again :)

    Thanks,
    kemp
     
    kemp, Apr 20, 2004
    #1
  2. One way would be

    (vl-remove "patio" '("kitchen" "bedroom" "bathroom" "patio" "pantry" "dining"))
     
    Jason Piercey, Apr 20, 2004
    #2
  3. kemp

    Joshua Tapp Guest

    Are you wanting to remove an item based on the string or a specific item
    based on the order? In other words, are you wanting to remove "patio"
    wherever it may be, or are you wanting to remove the fourth string in the
    list? The reason I ask is that the code for each is different for each
    other.
     
    Joshua Tapp, Apr 20, 2004
    #3
  4. kemp

    kemp Guest

    Thats it, thanks Jason!

    I knew it would be something super easy.

    kemp
     
    kemp, Apr 20, 2004
    #4
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.