Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

When to close multiple IF statements with an els

Featured Replies

I have always found that closing multiple IF statements prior to an els has worked, till today.This works (sort of) wherein everything after the first IF works, but the basic argument of (A:SIM ON GROUND,bool) 0 == refuses to co-operate : (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } els{ 0 (>L:autorotate,bool) } } This works with the basic argument of (A:SIM ON GROUND,bool) 0 == where is resets when sim on ground, but the statements after the if do not work: (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } } els{ 0 (>L:autorotate,bool) } So the question is, when is it required to close an IF statement, an els statement or a combination of both??Steve

  • Author

""So the question is, when is it required to close an IFstatement, an els statement or a combination of both??""XML nest structuring of "if/els" kinda follow the rules of most programming languages. Each "if{" should have its finishing "}" and the same applies for "els{"I see in the second paragraph, there is a "}" missing here:....(>L:autorotate,bool) } ...which is strange because it does exists in the first.(?)In this case, the entire portion after the first "if{" will execute as long as SIM ON GROUND is 0: (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } els{ 0 (>L:autorotate,bool) } }Or you might save the nested if/els using bool conditionals:(A:SIM ON GROUND,bool)if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) ! || (L:CorrectedN1,enum) 57 <= || (>L:autorotate,bool) }(Note: remember "ampersand"; should be used instead of "<")Hope this helps a bit.Tom

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.