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.

Optimize Element lines

Featured Replies

Do you think the following can be optimezed if you have many of these lines? (@c:NearestAirportCurrentIdent,string) 'EHAM' scmp ! if{ 1 (>L:String Value, enum) } (@c:NearestAirportCurrentIdent,string) 'EHBK' scmp ! if{ 2 (>L:String Value, enum) } (@c:NearestAirportCurrentIdent,string) 'EHEH' scmp ! if{ 3 (>L:String Value, enum) } Roelof

Hi,This could be a good approach: (@c:NearestAirportCurrentIdent,string) sp00 sp1 :0 'EHEH' 'EHBK' 'EHAM' 3 l1 case l0 scmp l1 2 <= and if{ l1 ++ sp1 g0 }l1 2 > ! l1 ++ * (>L:String Value, enum)You can compare as much as 25 different strings with this snippet.Another approach would be neccesary in case more are needed.TomEDIT: Modified to leave (L:String Value, enum) in 0 if none of the strings matchs the varAnd if you find it rather complex, this should work ok too:c(@c:NearestAirportCurrentIdent,string) sp0l0 'EHAM' scmp ! if{ 1 }l0 'EHBK' scmp ! if{ 2 }l0 'EHEH' scmp ! if{ 3 }(>L:String Value, enum)For a few strings this seems to be more appropriate :-)

>Hi,>This could be a good approach:>For a few strings this seems to be more appropriate :-)Thanks Tom. I'll have a go at it and report back.c <---------------------------- Has this any meaning?(@c:NearestAirportCurrentIdent,string) sp0l0 'EHAM' scmp ! if{ 1 }l0 'EHBK' scmp ! if{ 2 }l0 'EHEH' scmp ! if{ 3 }(>L:String Value, enum)Roelof

Hi,Yes, afaik it clears the stack, so in case of "bad" code, calc's will stop. Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

>Hi,>>Yes, afaik it clears the stack, so in case of "bad" code,>calc's will stop. >>Jan>>"Beatus ille qui procul negotiis..."Hi Jan,So that is what it is. The last code works really well. Didn't try the first one.Credits to Tom.Roelof

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.