Page 2 of 2
Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 6:41 pm
by richmond62
I understand "rhetorical" full well, but I felt like a spot of fun, so I replied to your
question anyway.
Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 6:44 pm
by Klaus
richmond62 wrote: Tue Mar 10, 2020 6:41 pmI understand "rhetorical" full well, but I felt like a spot of fun, so I replied to your
question anyway.
I know!

Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 7:34 pm
by richmond62
The most important thing is that the "dirty deed" is now done.
-

- Screenshot 2020-03-10 at 19.53.18.png (78.74 KiB) Viewed 7504 times
Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 8:34 pm
by bogs
richmond62 wrote: Tue Mar 10, 2020 7:34 pm
The most important thing is that the "dirty deed" is now done.
But now, of course, the question is whether or not it "was done dirt cheap!"

Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 8:47 pm
by richmond62
bogs wrote: Tue Mar 10, 2020 8:34 pm
richmond62 wrote: Tue Mar 10, 2020 7:34 pm
The most important thing is that the "dirty deed" is now done.
But now, of course, the question is whether or not it "was done dirt cheap!"
Well, it took me about 60 minutes + 60 minutes in bed with the cat when my brain was going round in circles.
I am still looking for a
LOGICAL reason for why including
setting variables inside a
switch statement did not work.
Re: Having fun with multiple monitors
Posted: Tue Mar 10, 2020 10:50 pm
by dunbarx
I learned this a long time ago about "Switch" constructions, which I love.
You just cannot put stuff inside a "Switch" construction, but outside the "case" statements. Check this out, with a button and a field on a new card:
Code: Select all
on mouseUp
put random(42) into fld 1
switch the number of btns
--put random(42) into fld 1
case 1
break
case 2
break
end switch
end mouseUp
Comment, in turn, only ONE of the "random" statements. If you comment out the bottomMost, you get a random number. But if you comment the topMost, you get LC ignoring you.
Craig
Re: Having fun with multiple monitors
Posted: Wed Mar 11, 2020 1:35 am
by jameshale
Surely once the “switch” statement is read the engine searches for the first “case” statement that qualifies.
Anything else is redundant and ignored.
I daresay any statement between the “switch” and the first “case” will be ignored.
Re: Having fun with multiple monitors
Posted: Wed Mar 11, 2020 7:24 am
by LCMark
@jameshale is correct - the switch statement reads the statements inside it in order, and then operates like a jump table:
Code: Select all
switch X
... (1)
case A
... (2)
break
case B
... (3)
case C
... (4)
break
default
... (5)
end switch
The engine evaluates X - if it matches A then it jumps to (2), when it hits the break it will jump to 'end switch' (skipping the other blocks); it matches B then it jumps to (3), as there is no break it will then continue to execute (4). If it matches C then (4) only executes. If it matches none of them then it jumps to (5) (the default section).
At no point can any statements at point (1) be executed, nor would any statements between any of the breaks and cases.
Re: Having fun with multiple monitors
Posted: Wed Mar 11, 2020 8:41 am
by richmond62
Thank you very much for a complete and easily comprehensible answer.