It is currently Wed Jul 24, 2019 9:53 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: KeyboardPushed() IDE and Helpfile can't agree on return valu
PostPosted: Sun Jun 23, 2019 7:25 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jul 23, 2011 1:13 am
Posts: 202
Location: Germany
The IDE Quick Tip says "returns 1 if key is pressed", the helpfile says "returns non-zero".
"return 1" doesn't seem to be correct.

See this thread: viewtopic.php?f=7&t=73057


Top
 Profile  
Reply with quote  
 Post subject: Re: KeyboardPushed() IDE and Helpfile can't agree on return
PostPosted: Wed Jun 26, 2019 12:04 pm 
Offline
User
User

Joined: Mon Jul 17, 2017 7:22 am
Posts: 56
Location: Cotswolds England
Am I missing something here Derren but isn't 1 NonZero?

_________________
If it's falling over......just remember the computer is never wrong!


Top
 Profile  
Reply with quote  
 Post subject: Re: KeyboardPushed() IDE and Helpfile can't agree on return
PostPosted: Wed Jun 26, 2019 4:59 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jun 25, 2014 5:25 pm
Posts: 343
Location: Germany
C87 wrote:
but isn't 1 NonZero?
Of course, but the two different descriptions can cause the programmer to write wrong code.
IDE Quick Tip wrote:
returns 1 if key is pressed
The programmer could now think that the If query could be written like this:
Code:
If KeyboardPushed(...) = 1
  ; Key is pressed
EndIf

_________________
Image
Why OpenSource should have a license
PureBasic-CodeArchiv-Rebirth: Git-Repository / Download -- Any help is welcome!
Manjaro Xfce x64 (Main system) :: WindowsXP/Xubuntu x86 (VirtualBox) :: PureBasic (Linux: x86/x64, Windows: x86) :: All are up to date


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