Hi,
I have a recurring problem in some of my gauges, which is:
In displaying a numeric value, I'd like the number of decimals displayed to be dependant on the value.
I.e. how to code a value-dependant format specifier line.
Something like:
Any suggestions ?
Thanks in advance.....
Rob
I have a recurring problem in some of my gauges, which is:
In displaying a numeric value, I'd like the number of decimals displayed to be dependant on the value.
I.e. how to code a value-dependant format specifier line.
Something like:
Code:
If (G:Var1) > 100, (G:Var1) displayed as in:
<String>%((G:Var1))%!d!</String>
If (G:Var1) between 10 and 100, (G:Var1) displayed as in:
<String>%((G:Var1))%!3.1f!</String>
If (G:Var1) < 10, (G:Var1) displayed as in:
<String>%((G:Var1))%!3.2f!</String>
Of course I can use multiple <Element> structures, and test for the (G:Var1) range in a <Visibility> structure for each <Element>, but that gives a lot of duplicated code in each <Element>
So I'm looking for a way to code the above in one <String>......</String> structure.
Any suggestions ?
Thanks in advance.....
Rob






