This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
axel.codeFail()'s profile picture

Table Entries

Started by axel.codeFail(), 06 April 2014 - 03:42 AM
axel.codeFail() #1
Posted 06 April 2014 - 05:42 AM
I wasn't sure where to post this, so it's here.

I was wondering if it was possible to remove an entry from a table


myTable = {
  ["entry1"] = "one",
  ["entry2"] = "two",
}

i.e. removing "entry1" and its value from the table.
Bomb Bloke #2
Posted 06 April 2014 - 05:51 AM
myTable["entry1"] = nil
axel.codeFail() #3
Posted 06 April 2014 - 05:23 PM
myTable["entry1"] = nil

Wow, I was thinking about trying that, but I thought it would just set entry1's value to nil, not remove the whole thing. Thanks
Edited on 06 April 2014 - 03:23 PM