Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Jul 23, 2006 12:04 pm Post subject: List index bug, or not? |
|
|
I was just playing some with the list commands and found this little "bug":
Code: | list create,1
list add,1,LIST1 A
list add,1,LIST1 B
list add,1,LIST1 C
list create,2
list add,2,LIST2 A
list add,2,LIST2 B
list add,2,LIST2 C
list add,2,LIST2 D
list add,2,LIST2 E
# Seek for fourth item
list seek,2,4
list assign,2,1
# You would expect the index number not to exceed 2, but it still is 4
info @index(2)
# This now won't work
info @item(2)
info @text(2) |
But when you use the delete command, the list index dóes change:
Code: | list create,1
list add,1,LIST2 A
list add,1,LIST2 B
list add,1,LIST2 C
list add,1,LIST2 D
list add,1,LIST2 E
# Seek for fourth item
list seek,1,4
list delete,1
list delete,1
# You would expect the index number not to exceed 2, and it doesn't
info @index(1)
# Will display the 2nd item
info @item(1)
info @text(1) |
Do you think the not-changing index number when using "list assign" is a bug, or is it something done on purpose? _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|