Jump to content
Sign in to follow this  
taguilo

Usage of text in XML L:Variables

Recommended Posts

Hi,Is it possible to store a text in a (L:something) variable likeMy Text (>L:something,string) for use in other gauges (displaying that "My Text" there)?I can't get it working, tried several units, worked with macros... I'm aware of an old thread here in the forum where it is said it's not possible at all - is that really true?If so, I'll probably have to transform every single charakter to an integer (and back) using the XML string operators symb, ord and chr. But to say the truth, I'm a bit lazy to write that routine - if there is a simplier solution.Any help more than welcome!Herbert

Share this post


Link to post
Share on other sites

Nope. L:vars store only float64 numbers, period.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

While you can't use an L var, you might be able to use an XML Macro to do what you want to do.For example, this statement defines a macro: 0while this one uses it: @DISABLEDThe macro "call" is replaced by the macro's definition. The above uses numbers, but they are treated like text actually, so text would work too, as long as it makes sense where you have it expand.Patrick

Share this post


Link to post
Share on other sites

As Patrick stated, it is easy to handle a short set of predefined text strings using macro references. Even it would be easier to use a simple "case" operator for retrieving one string of up to 25 different. For short and runtime created strings, the Ascii conversion is a good resource as well.Tom

Share this post


Link to post
Share on other sites

Thanks for the answers! That works quite well inside ONE gauge. But how can I get it displayed in an other gauge? As much as I know, these macros are for use in that gauge only where they are defined.Or am I missing something...I want to build a gauge which reads out the NAV AID IDs and stores them in this L:variables / macros so that I can use this information in a different gauge. So I can display the ID belonging to a special frequency without having tuned that frequency.It's still a bit experimental and I'm not shure what the gauge will be for in the end... but if I can not get this working, obviously it will be for nothing...

Share this post


Link to post
Share on other sites

>>I want to build a gauge which reads out the NAV AID IDs and>stores them in this L:variables / macros so that I can use>this information in a different gauge. So I can display the ID>belonging to a special frequency without having tuned that>frequency.>In this case I should go for the ASCII code of individual ID chars.You can save it using a couple of LVars for each ID (1 to 5 chars), and each LVar being a member of an array of IDS. Tom

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...