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.

L Vars Question

Featured Replies

Hi All,I cannot seem to get the penny to drop. Can someone provide me with a simple code example using L vars to turn on and off the nav lights.I can get it to work using normal code but I'm trying to get a grip on L vars and it would help, I think, if I can compare the two side by side.Here is the normal code thats works. Can L Vars do the same?(A:Light nav,bool)Yes I have read many discussions on this topic but it still eludes me.Thanks,Douglas.

  • Moderator

Of course not...L:vars are custom defined variables that aren't tied to anything specific in the sim.Besides, L:vars share one property with A:vars - they simply report a condition. They are not "action variables" (or "verbs") at all.Only K:variables are "action variables" - or, more properly are "key events." That is, they control stuff.Using your example, TOGGLE_NAV_LIGHTS (or (>K:TOGGLE_NAV_LIGHTS) ) is an "action event" - that is, it controls whether NAV LIGHTS are on or off.(A:Light nav,bool) on the other hand, is an "adjective word," that is, it reports the condition of the NAV LIGHTS as 0 = off or 1 = on.The primary use of a custom, L:variable would be to keep track of something that is not already provided for by the default A:variables.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

At least for L Vars, this may be helpful:"Anatomy of an XML code"http://www.aerodynamika.com/cgi-bin/yabb/Y...;num=1129865563by Fr. Bill.BTW Fr. Bill - thanks for this post. It puts in perspective how to "think" about the different variables.

  • Author

Gentlemen,Thank you both for the replys and explanations and link.I guess I cannot see the forest for the trees but I'll get it yet having had some success with this gauge.Thanks again,Douglas(L:GEN1 Switch,enum)(L:GEN1 Switch,bool) 0 == //// AC Volts %((A:electrical genalt1 voltage, volts))%!3d!APU GENGEN1(ON):3 (>L:GEN1 Switch,enum)

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.