October 1, 200322 yr I want to print a decimal number in XML with leading zeroes.E.g. value "1" using the format spec. !4d! is printed as "1"; I want it printed as "0001"Is this possible, and how ?Rob
October 2, 200322 yr >I want to print a decimal number in XML with leading zeroes.>E.g. value "1" using the format spec. !4d! is printed as "1";>I want it printed as "0001">Rob".. C%((L:Count,enum))%!6d%" displays values like " C000123" for me, maybe due to only one "!". Unless it's the 'enum' type. Ron
October 2, 200322 yr Hi Arne,!04d! did it :-)If you don't mind my asking: how does one obtain this kind of info (other than asking in this forum :-) ) ?The panel SDK is very limited on XML, and without your XML introduction document I would have been nowhere with all the XML gauges I've made.Thanks, Rob
October 2, 200322 yr >Hi Arne,>>!04d! did it :-)>>If you don't mind my asking: how does one obtain this kind of>info (other than asking in this forum :-) ) ?>Thanks, Rob I just tried different varations in my Test Gauges. I knew about things like !04d and had looked over the C formats in Arne's XML archive. For some reason what I'd copied and pasted into my reply worked for my 'count' variable.>The panel SDK is very limited on XML, and without your XML>introduction document I would have been nowhere with all the>XML gauges I've made. Hopefully, something better will be in an SDK for FS9 'XML'. Which appears to be more powerful and not such a cludge. Ron
October 2, 200322 yr It looks like a typical parameter in C when using printf. A lot of similarities (it would have been "%04d" in C)I wonder if !04X! works too (hexadecimal number with leading 0)
Create an account or sign in to comment