SelectElement() and ResetList()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

SelectElement() and ResetList()

Post by akj »

I would like a minor generalisation made to the functionality of SelectElement() so that when the last parameter is negative, it acts like ResetList() rather than giving a run-time error (whilst in the debugger).

For example:

Code: Select all

SelectElement(mylist(),-1)
currently generates a runtime error. I would like this changed so that instead its behaviour becomes identical to that of

Code: Select all

ResetList(mylist())
This will simplify the logic of some of my programs.
Anthony Jordan