Sign in to follow this  
phjvh

String variables

Recommended Posts

Would someone be kind enough to supply an explanation of the variables used when placing a string.specifically the x,y values within the brackets, but also how to add decimal places and fix text to significant numbers. ( so that instead of just seeing 1 you could see 001)i've checked the board and seen a few examples but not sure what each bit does.cheers

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,Check Arne Bartels xml guide dokument in that zip there are some more zipped files with explanation of string printing. You find the link at the top post ie xml faqRgdsEugen

Share this post


Link to post
Share on other sites

Hi,An example: = where in the gauge. = single line. multi never tried.A few examples:HalloOne with a funtion concerning the 0 and decimals:%((Indicated Altitude,feet))%!d% shows p.e. 500%((Indicated Altitude,feet))%!0d% shows p.e. 00500%((Indicated Altitude,feet))%!0.1d% shows p.e. 00500.0%((Indicated Altitude,feet))%!0.2d% shows p.e. 00500.00(Couldn't check the right synthax this moment , but it will give a general idea)Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,I think this your example be would be valuable in the FAQ please post it to the faq.BrgdsEugen

Share this post


Link to post
Share on other sites

just had a go with the text and i can't get the leading zeros to show. this means the text is going to move around within the gauge

Share this post


Link to post
Share on other sites

Hi,First we need to see the code of your gauge.Then we can make some adjustments.Anyway, the next examples are ok:%((A:AUTOPILOT HEADING LOCK DIR, degrees))%!03d!%((A:AUTOPILOT VERTICAL HOLD VAR, feet per minute))%!04d!%((A:AUTOPILOT ALTITUDE LOCK VAR, feet) 99999 min 0 max)%!05d!Try and see.Jan"Procul Negotiis"

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