Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
| |
|
LPGhatguy
|
  |
 |
| Joined: 27 Jun 2008 |
| Total Posts: 4725 |
|
|
| 30 Mar 2012 11:44 PM |
Sure. You can have anything as an index.
Table indexes are nearly pointless though, unless you intend on the table being iterated through with pairs and using both the index and value. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2012 11:47 PM |
Of course.
ConfusingTable = {[{}]={},[{[{}]={}}]={},[{[{[{}={[{}]={}]}]={}]={}]={}} |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2012 11:47 PM |
> Sure. You can have anything as an index.
Anything except nil, that is. |
|
|
| Report Abuse |
|
|
LPGhatguy
|
  |
 |
| Joined: 27 Jun 2008 |
| Total Posts: 4725 |
|
|
| 31 Mar 2012 12:03 AM |
@kingkiller1000 Except that nil isn't *something*. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 03:56 AM |
| Never even considered this. Why would you want this? (Although a backwards-reference table to get index of an object would be usefull I guess) |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 31 Mar 2012 11:21 AM |
Ive only found part keys useful if you want a table where you store data for each part.
And thats because you cant store the data in parts directly. But with tables you can so i dont see the point of using them as keys. |
|
|
| Report Abuse |
|
|
LPGhatguy
|
  |
 |
| Joined: 27 Jun 2008 |
| Total Posts: 4725 |
|
|
| 31 Mar 2012 01:05 PM |
@Oysi What if we have weakly-referenced tables? |
|
|
| Report Abuse |
|
|