BindGadgetEvent - Compiler missed check

Just starting out? Need help? Post your questions and find answers here.
Num3
Posts: 22
Joined: Wed Apr 09, 2014 7:09 pm

BindGadgetEvent - Compiler missed check

Post by Num3 »

The compiler does not check the correct sintax for the callback function:

Code: Select all

BindGadgetEvent(5,@Button_Callback()) ; Notice the brackets
BindGadgetEvent(5,@Button_Callback) ; Compiler does not give error if brackets are missing!
User avatar
ts-soft
Posts: 9
Joined: Wed Feb 26, 2014 2:00 pm
Location: Berlin - Germany

Re: BindGadgetEvent - Compiler missed check

Post by ts-soft »

Your both Syntax a correct, but not the same. @Button_Callback can hold the adress to a callback.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply