Page 1 of 1
[Done] Return value for ChangeCurrentElement()
Posted: Sat Aug 03, 2019 11:35 am
by Little John
It would be helpful if
ChangeCurrentElement() returned 0 on error, and non-zero on success (as it is the case for many other built-in PureBasic functions).
see
viewtopic.php?f=13&t=73313
Re: Return value for ChangeCurrentElement()
Posted: Sat Aug 03, 2019 12:45 pm
by freak
The only way to know if the pointer you passed is valid is to do a ForEach through the entire list to check. That would defeat the purpose of the function.
You must pass a valid pointer. There is no "error" case for this function.
Re: Return value for ChangeCurrentElement()
Posted: Sat Aug 03, 2019 12:51 pm
by Little John
I see. Thank you for the explanation!