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
Help AVSIM continue to serve you!
Please donate today!

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

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