View Single Post
06-20-12, 10:23 PM   #21
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Honestly I can't even think of any scenario where it would even be useful or desirable to store nil values in a table.

If you're removing a value from an indexed table (array), and need to preserve the original indices of the other values for some reason, just set the value to false or -- if you're already using booleans for something else -- a custom string like "nil", or a number like -1, or some other value that is obviously different from the "real" values in the array that you can consistently assume means "there is not a real value at this index".
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote