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.

How does inline "case" work?

Featured Replies

  • Commercial Member

I'm trying to set the value of a G:var based on the value of another, as in:18 (>G:Var1)1 2 8 10 11 12 15 16 18 19 20 11 (G:Var2) case 0 (>G:Var2)181 183 184 185 193 197 0 7 (G:Var2) case 18 (>G:Var2)But this obviously doesn't work:(. I'm trying to set the value of G:Var2 to either 0, if G:var1 = the one of the first set of values, or 18 if it's one of the second sets of values.Can anyone show me how the syntax would work for this?Thanks,--Jon

Hi,Probably this works too:(G:Var1) 20 <= if{ 0 (>G:Var2) } els{ 18 (>G:Var2) }Jan"Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

If you look in xmlgau01.zip you'll find the case syntax a bit explained.It is first the values you want to get out of the case, then the numbers of entries, then the value the case depends on, then "case":e.g. setting G:Var2 depending on G:Var11 2 8 10 11 12 15 16 18 19 20 11 (G:Var1) case (>G:Var2)"1 2 8 10 11 12 15 16 18 19 20" are the values to set, these are 11 items, it depends on G:Var1, after the case you have the "cased" values, which can be written to G:Var2. Note the output can be quite reversed, I assume if G:Var1 is 0 the returned value is 20, 1->19,...,10->1. If you want it reversed, reverse the values.Arne Bartels

  • Author
  • Commercial Member

Ah yes thanks, it was the output values that were stumping me. I was able to adjust the thing accordingly.Thanks again!--Jon

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.