I am trying to understand the following sample code from the on-line documentation.
When compiled as a Quick Win program it runs. Can someone please explain the code?
INTEGER(4) mouseevent, keystate, x, y
mouseevent = MOUSE$RBUTTONDOWN .OR. MOUSE$LBUTTONDOWN
result = WAITONMOUSEEVENT (mouseevent, keystate, x , y)
if ((MOUSE$KS_SHIFT .AND. keystate) == MOUSE$KS_SHIFT) then
write (*,*) 'Shift key was down'
endif
if ((MOUSE$KS_CONTROL .AND. keystate) == MOUSE$KS_CONTROL) then
write (*,*) 'Ctrl key was down'
endif
1) Please explain: mouseevent = MOUSE$RBUTTONDOWN .OR. MOUSE$LBUTTONDOWN
i.e. what does it mean to .OR. two symbolic constants and set that equal to mouseevent which is INTEGER(4). And how does that work?
2)How are the tests in the IF statements made?
Thank you.