- Messages
- 371
- Country

Hello,
I am not sure to undestand properlly all about Macro, because I am an old boy with a old brain.
I would like to know if Macro are the same thing as a function, meaning that it return always a value ?
or
Can I use a Macro as "sub", that I call to avoid to have the same code at several place in my gauge ?
Exemple :
I have these 2 following lines four times in one of my gauge (overwrite FSX PLN files) :
Can I create 2 macros like this :
And use them by call @Secondes and @Minutes, without a return value required.
I am right or not ?
Edit : I tested with this code, but as the chance to have a waypoint with a 60' value or a 60' value is small, I don't know if the macro synthax works when I overwrite my flight plan.
So, if someone can confirm to me that my macro using is ok....
Thanks
Francois
I am not sure to undestand properlly all about Macro, because I am an old boy with a old brain.
I would like to know if Macro are the same thing as a function, meaning that it return always a value ?
or
Can I use a Macro as "sub", that I call to avoid to have the same code at several place in my gauge ?
Exemple :
I have these 2 following lines four times in one of my gauge (overwrite FSX PLN files) :
Code:
(L:Seconds,number) 60 == if{ (L:Minutes,number) 1 + (>L:Minutes,number) 0.00 (>L:Seconds,number) }
(L:Minutes,number) 60 == if{ (L:Degrees,number) 1 + (>L:Degrees,number) 0 (>L:Minutes,number) }
Can I create 2 macros like this :
Code:
<Macro id="Macro" Name="Secondes">
<MacroValue>(L:Seconds,number) 60 == if{ (L:Minutes,number) 1 + (>L:Minutes,number) 0.00 (>L:Seconds,number) }</MacroValue>
</Macro>
<Macro id="Macro" Name="Minutes">
<MacroValue>(L:Minutes,number) 60 == if{ (L:Degrees,number) 1 + (>L:Degrees,number) 0 (>L:Minutes,number) }</MacroValue>
</Macro>
And use them by call @Secondes and @Minutes, without a return value required.
I am right or not ?
Edit : I tested with this code, but as the chance to have a waypoint with a 60' value or a 60' value is small, I don't know if the macro synthax works when I overwrite my flight plan.
So, if someone can confirm to me that my macro using is ok....
Thanks
Francois
Last edited:
