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.

XML Strings

Featured Replies

Hi!Is there any possibility in XML that you save a string in a costum variable like 'string' (>L:Variable, string)I've tried something like this but it doesn't work:------------------------------------------------------------------ 'hs' (>L:Var,string) :%( (L:Var,string) )%!s!:------------------------------------------------------------------Any ideas?Best Regards,Harry

  • Commercial Member

Harry, Unfortunately L:vars don't support string data types. You'd have to test the value and convert it to a string based on its numeric value. Generally, at least for the stuff I've been doing, I haven't needed anything too robust (simple case lookups), but you could write a parser of some kind if you wanted to be able to store and retrieve 'string' data as numeric values.%((L:Word, enum))%{case}%{:1}%Alpha%{:2}%Bravo%{:3}%Delta%{end}--Jon

Thanks for your answers! :-)Regards,Harry

Hi,Just a curious question:What do you want to achieve with the string.Some typing or must there be a function too?Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Well I had to ask for someone who isn't an AVSIM user.He wanted to write the color string(e.g. 'red') into a L var.Then he wanted to write this variable into the color="" attribute of a Text-String, so that the color changes by changing the L var.But of course there is a much better way to do this:TEST:%((L:farbe, enum))%!d! (L:farbe, enum) 3 == if{ 0 (>L:farbe, enum) } els{ (L:farbe, enum) 1 + (>L:farbe, enum) } Regards,Harry

  • Author
  • Moderator

>But of course there is a much better way to do this:>Color="%( (L:farbe, enum) 0 == if{ 'white' } (L:farbe, enum) 1>== if{ 'green' } (L:farbe, enum) 2 == if{ 'yellow' } (L:farbe,>enum) 3 == if{ 'red' } " A similar solution was posted in this very forum last year. A search would have found it quickly... ;)Had the original question been more descriptive of the "end result," one of us could have pointed to that thread... ;)Here's a link to another way to accomplish "dynamic color changes" in a fixed text string:http://forums.avsim.net/dcboard.php?az=sho...16945&mode=full

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi Bill!Well, the problem is that the person who asked me didn't tell me all information at first. So I didn't know what he wanted to do.(I thought he just wants to work with strings in L:vars)I think you know the FXP forum!? Have a look here: http://www.wcm.at/forum/showthread.php?s=&...15&pagenumber=1After he told me that he "just" wants to set the color of the text, I knew that this posting here at AVSIM was senseless, because the solution was pretty easy(the code above took me 5min of work...so it wasn't really difficult).But nevertheless, I've learnd something new: There is no possibility to make L: vars of the kind string.(or at least just with some extra add ons)...Regards,Harry

  • Author
  • Moderator

Not a problem, sir! No, I was not aware of that forum you so graciously provided a link to. Although I can still read fluently, my written (not to mention spoken!) Deutsch is nicht so gut heute... ;)I have always had a love of great music. When I was a small boy, lo these many decades ago, I "fell in love" with the idea of being a choirboy, and rather shocked my father and mother by daring to suggest that they emigrate to your lovely Austria so I could audition for the Weinersangerknaben... I'll leave their response to that suggestion to your imagination! ;)While a student at Leysin American School in Leysin-Feydey, Suisse I would take the train to Wein at least once each month to attend sung Mass at the Cathedral... all so I could revel in the dulcet tones of such lovely voices of angels!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Und die Wiener "Schrammel" mit Wein im Heurigen....Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

>Und die Wiener "Schrammel" mit Wein im Heurigen....>Is dat Fries :-) ????Sorry, I'm a bit "melig" in view of my "other" threads in the other forum :-)Haven't had the time to visit my favorite forum for a few days; I must admit,it's relaxing ..LOL Cheers, Rob

Rob,Sterkte gewenst!Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Rob,Andere men van mij!Tom

Hi!I think you know the FXP Forum already, because you've once written some answers to questions about your Socata!?Yes, the S

  • Author
  • Moderator

>I think you know the FXP Forum already, because you've once>written some answers to questions about your Socata!?Oh my, that was years ago! I'd quite forgotten about it... ;)>Yes, the S

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.