# <Case> in <Click >

## Recommended Posts

Hi all Will work in . Tried:- 1 2 5 10 15 5 (L:SetValue, number) case =! if{ 1 (>L:Flaplock,bool). No good, Want L:Flaplock,bool to give 1 if the case numbers are not entered.

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

Hi,I still don't understand what you want to do here, but the case operator does work.As it reads: your variable L:Setvalue should have 6 possible values: 0,1,...5, and depending on this value, the result of the "case" is that one of the 5 values is pushed onto the stack.So: 1, if Setvalue=5and 15, if Setvalue=0Next to the "case" you have =!; but "unequal" to what ?? There's should be another value on the stack to test for un-equality.But I feel you try to use the "case" for some purpose it isn't ment for. Like what do you mean with " if the case numbers are not entered" ?? Rob

##### Share on other sites

Hi Rob Putting the flap setting numbers in the FMC scratchpad I am only allowed 1 2 5 10 15. If the wrong number entered it must show INVALID ENTRY I need an L:var to do this.

##### Share on other sites

Paul,"case" operator doesn't seem to be the best solution for what you want.Maybe this one works:(Setvalue) sp0l0 1 == l0 2 ==l0 5 == l0 10 ==l0 15 ==+ + + + ! if{ INVALID ENTRY }Tom

##### Share on other sites

Tom Yes it works perfectly, As I get deeper into this thing the maths gets harder. Thanks again. Paul

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!