Jump to content
Sign in to follow this  
Eberhard

Coding question on <Select><case>

Recommended Posts

I've got a coding question regarding the statement.In my eraly programming days with Turbo and Borland Pascal you could expand the statement with a range, i.e. .Is this possible in XML? I've tried it, but it seems not to work.Here is a code snippet (A:TURB ENG1 N2, rpm) etc. further code here I would like to do away with the redundancy by not repeating code. My idea is a follows: (A:TURB ENG1 N2, rpm) etc. further code hereIs this possible. It did not work for me. I'll appreciate some help on this idea.Eberhard------------------------------------Eberhard Haberkornhttp://www.focusthink.com/~weather-maker/betatester.jpghttp://www.focusthink.com/~weather-maker/proudsupporter.jpg

Share this post


Link to post
Share on other sites

Hi,This is the only way you can use :(example from my panel)(L:teflaps,bool) (L:leflaps,bool) and if{ (A:FLAPS HANDLE INDEX,enum) } els{ 7 }Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

This may work ONLY if each LED has a range of 0.3 rpmIt will reduce the case statements by a factor of 4.(A:TURB ENG1 N2, rpm) s1 d 13.2 < l1 20 > || if{ 0 } els { l1 13.2 - 0.3 / near 1 min }etc.... through case 23Not sure how you want it to display, so this value may work too. (A:TURB ENG1 N2, rpm) s1 d 13.2 < if{ 0 } els { l1 13.2 - 0.3 / near 1 min 23 max} Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Hi,Using a range of values within a as you intend is not possible. However, this is a optimized code that should work: (A:TURB ENG1 N2, rpm) 13.5 > Tom

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • 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!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...