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.

What is the language of this coding?

Featured Replies

I understand the basic Syntax of XML -- for example the need for correct "nesting" , etc .I understand the various XML "TAGS" that "do " things in the XML files. I understand that it all works using RPN (Reverse Polish Notation" - very diffucult to get your head around , but you can get information to helpBut what I CANT understand is -- what language is this??(L:adfhz1,Kilohertz) 0 == if{ (A:ADF1 ACTIVE FREQUENCY, Kilohertz)(>L:adfhz1,Kilohertz) } els{ (L:adfhz1,Kilohertz) s0 1000 < if{ l0 10 * near10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * +16 * + (>K:ADF_LOWRANGE_SET) } els{ l0 10 * near 10000 % d 10 % r 10 / int d10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * +(>K:ADF_HIGHRANGE_SET) } }Could somebody describe in ENGLISH what this staement is saying.And then could you put it into a computer language that I do understand (BASIC) .Any help would be much appreciated . I "think" that I can see that essentially it is a very basic thing - even though it looks extrmely complex.Barry

Er........this is still XML.The code is from my aircraft panel for my C4SST aircraft package.A bit of background. This is from my radio frequency memory bank, where active radio frequencies can be stored, and retrieved later simply by clicking. Note that the frequencies are stored as numbers (see later in text).Basically, when you click in the 'memory' box, the current active frequency is stored in this box. If the active frequency is changed for whatever reason, clicking the 'memory' box will install the memorised frequency back into the active part of the radio. There is also a 'clear' box you can click to clear the memory box. The code you have shown just happens to come from my ADF memory, there are others for the other radio types, and (L:adfhz1,Kilohertz) shows we are dealing with the first stored memory and is stored as a number with the variable name adfhz1.So, when you click the 'memory' box............(L:adfhz1,Kilohertz) 0 ==checks to see if the box is empty. If it is empty,if{ (A:ADF1 ACTIVE FREQUENCY, Kilohertz) (>L:adfhz1,Kilohertz) }sets adfhz1 to the current active frequency and is memorised with this variable name. If it is not empty, that is, a frequency has been previously stored, the memorised value will be reinstalled as the radio active frequency and done byels{ (L:adfhz1,Kilohertz) s0 1000 < if{ l0 10 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:ADF_LOWRANGE_SET) }Two things here, the first is to compare to 1000, and if less than 1000, set the radio to low range,that is,(L:adfhz1,Kilohertz) s0 1000 < if{ l0 10 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:ADF_LOWRANGE_SET) }and if greater than 1000,els{ l0 10 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:ADF_HIGHRANGE_SET) }The second thing is the code l0 10 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + The l0 (note, lower case L plus zero) brings the stored number back to the top of the stack. FS2002 will not accept a number as a frequency. The above code converts the number into something FS2002 understands. It is called BCD (Binary Coded Decimal) conversion. Arne Bartels came up with this device.Without going into great depth and explaining how the BCD conversion works, I think that explains what the code does. Do a search for BCD in this forum for more information.I hope this has helped.Nick Pike.

  • Author

Nick Thanks for that -- I will just have to go slowly through this piece of "code" and see if I can follow it.BTW , I like your C4SST -- actually, I downloaded it specifically for the reason that it contains lots of XML gauges and code. There is so much to learn - associated with FS2002 . I am slowly getting there but keep getting sidetracked .Regards Barry

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.