 |
charneus Wizard

Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Jun 19, 2010 4:01 am
[3.20]BUG: #ADDITEM and %additem |
1. In an untitled session, type on the command line #10 {#ADDITEM TestVar %additem(%random(1,10),TestVar)}
2. Type #SAY {@TestVar}
I can't quite explain what it's doing, but it's not doing something correctly.
The same goes for using @TestVar instead of just TestVar.
Higher numbers will cause it to create a memory leak, similar to the one I had reported much earlier. While I know this isn't the optimum way to add items, I know that some people do use this syntax.
Charneus |
|
|
 |
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Sat Jun 19, 2010 4:06 am |
This -should- give the same results, but be a bit easier to understand:
Code: |
#10 {
#call %additem( %random( 1, 10), TestVar)
#additem TestVar @Testvar
} |
Very confused as to what you're trying to show, though. Those look like lists nested in lists to me.
You realize that you're adding an item then adding the entire list as a new item each iteration, yeah? |
|
|
 |
charneus Wizard

Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Jun 19, 2010 4:15 am |
Hmmm... I think it's more or less supposed to be #ADDKEY, but for some reason, I had a brain fart and was trying #ADDITEM. :\ Whoops! I suppose it's doing what it's supposed to do, if it continually adds TestVar to itself. :\
Charneus |
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|