Everything else that doesn't fall into one of the other PB categories.
-
novablue
- Enthusiast

- Posts: 177
- Joined: Sun Nov 27, 2016 6:38 am
Post
by novablue »
Does anyone else find it inconsistent that defining a map, list or array will clear its values but defining a variable does not:
Code: Select all
Define NewList TestList.i()
Define Var.i
AddElement(TestList()) : TestList() = 1 : AddElement(TestList()) : TestList() = 2 : AddElement(TestList()) : TestList() = 3
Var = 123
ForEach TestList()
Debug TestList()
Next
Debug Var
Debug "-------------"
Define NewList TestList.i()
Define Var.i
ForEach TestList() ; Now Empty
Debug TestList()
Next
Debug Var ; Still there
-
mk-soft
- Always Here

- Posts: 6248
- Joined: Fri May 12, 2006 6:51 pm
- Location: Germany
Post
by mk-soft »
Actually, there is the function ClearList.
That NewList works and thus creates a new list is new to me. It says so. New-List
It is also good that the variables are not overwritten.
It doesn't bother me at all.