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.

Does XML do nested else-if statements?

Featured Replies

The following is the logic I need inside one mouse area:If VarA = 0 and VarB = 0, then set VarA = 1 and VarB = 1,else if VarA = 1 and VarB = 1, then set VarA = 0 and VarB = 0,else if VarA = 1 and VarB = 0, then set VarB = 1.One of the three statements will always be true.The following is my XML attempt to follow the above logic:(L:VarA, bool) ! ; (L:VarB, bool) ! ; &&if{ 1 (>L:VarA, bool) ; 1 (>L:VarB, bool) }els{ (L:VarA, bool) != ; (L:VarB, bool) != ; &&if{ 0 (>L:VarA, bool) ; 0 (>L:VarB, bool) } }els{ (L:VarA, bool) != ; (L:VarB, bool) ! ; &&if{ 1 (>LVarB, bool) } }The first level works, ie, when A and B both equal zero, they get reset to one. After that, nothing works.If the nested statements are not permissible, what about this:if VarA = 0 and VarB = 0, then set VarA = 1 and VarB = 1, goto g0if VarA = 1 and VarB = 1, then set VarA = 0 and VarB = 0, goto g0if VarA = 1 and VarB = 0, then set VarB = 1Once a true statement is found, then the goto jumps the remainingstatements to prevent them from being acted upon. Any comments appreciated.Glenn

Hi,Try (not tested):(L:VarA, bool) ! (L:VarB, bool) ! and if{ 1 (>L:VarA, bool) 1 (>L:VarB, bool) } els{ (L:VarA, bool) (L:VarB, bool) and if{ 0 (>L:VarA, bool) 0 (>L:VarB, bool) } els{ (L:VarA, bool) (L:VarB, bool) ! and if{ 1 (>LVarB, bool) } } } Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

All three levels now work great. Thanks so much.One of the problems I have learning XML is spaces. The presence (or lack) of a space is not alway clear when reading code because different font types show spaces in varying width. Because space requirements are so exact in XML, I think having a visiblecharacter (~, maybe) instead of a space would make code easier to learn.Glenn

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.