DeleteElement() return value as official feature
Posted: Tue Oct 15, 2013 1:39 am
At the moment DeleteElement() is returning non-zero if there is a current element after deleting and it is returning zero if there is no current element after deleting.
PureBasics help file says, that DeleteElement() has no return value. Since the (de facto) return value is very useful, it would be nice to make it an official feature, so you can rely on it.
PureBasics help file says, that DeleteElement() has no return value. Since the (de facto) return value is very useful, it would be nice to make it an official feature, so you can rely on it.
Code: Select all
NewList a()
Debug AddElement(a()) ; = 31202064
Debug AddElement(a()) ; = 31202096
Debug AddElement(a()) ; = 31202128
Debug ""
Debug DeleteElement(a()) ; = 31202112
Debug DeleteElement(a()) ; = 31202080
Debug DeleteElement(a()) ; = 0
Debug ""
Debug DeleteElement(a()) ; = 0
Code: Select all
NewList a()
Debug AddElement(a()) ; = 29891344
Debug AddElement(a()) ; = 29891376
Debug AddElement(a()) ; = 29891408
Debug ""
FirstElement(a())
Debug DeleteElement(a()) ; = 0
Debug DeleteElement(a()) ; = 0
;...