Mercurio, you are very welcome to our site. Our site leader is Odin, and I see that you are Messenger to our god! (with slight mixing of mythologies!).
For the great length of time that I have been with this site, I still have difficulties with mouse codings (when is a mouse permanently down or just clicked?) and I see that you have mastered such techniques already.
I see that you have used an _unsigned BIT type for your Boolean variable. This is perfectly acceptable* and of course works completely as expected. However, our QB64 Expert-in-all-Things, Steve McNeill, discourages use of _BIT type variables except in some special cases. He would promote use of the _BYTE type variable for any Boolean. This is just an advisory guide.
* As a matter of fact, using the _Unsigned BIT type means that it can have value 0 or 1. The "convention" for True in QB64 is -1. As you derive bott1~` from _MOUSEBUTTON(1) value, I shall be interested to hear the experts' comments.
Thank you for Welcome
I'm one old programmer, for me not 1 is 0, not 0 is 1.
The Qbasic not have the boolean variables, boolean signed worst. The drag-drop example is one outgrowth of one
my old software of '90 years. If somebody is interested, i attach in this post one little txt of my old
subroutines for manage the mouse. Is possible it is useful for old hardware with MSDOS until Windows XP.
Naturally the variable bott% is integer.
My big surprise, is when i developped one recent videogame with the mouse subroutines with integer: something not go.
Fortunatly, some time after, i discover that is possible write the boolean variables.
For clear my mind, i conceive this experiment:Code: QB64: [Select]
bott% = 1 'The experiment can be repeated with bott% = 0 or -1 if want, or other, or other type variables, signed or unsigned. bott% = NOT bott% a% = a% + 1 'One check for see how many cicles does.
One bug?
Best regards at allbody, and excuse for my delay (I have always a lot of things to do), and for my not advanced english.
Syntax
CALL INTERRUPT(intNum, inRegs, outRegs)
Parameters
Registers are emulated in QB64 and there is no support for intNum 33h mouse functions above 3 or intNum requests other than 33.
inRegs are the values placed into the call and outRegs are the register return values.