It is currently Sun Sep 22, 2019 1:45 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Done] Return value for ChangeCurrentElement()
PostPosted: Sat Aug 03, 2019 11:35 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3655
Location: Berlin, Germany
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

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Last edited by Little John on Sat Aug 03, 2019 12:51 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Return value for ChangeCurrentElement()
PostPosted: Sat Aug 03, 2019 12:45 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5780
Location: Germany
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.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: Return value for ChangeCurrentElement()
PostPosted: Sat Aug 03, 2019 12:51 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3655
Location: Berlin, Germany
I see. Thank you for the explanation!

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye