Ternary operator
Posted: Wed Apr 08, 2020 4:46 pm
Hello everyone,
I suggest to add the Ternary operator like in C or C++ to PB language.
This the Macro I'm currently using for that :
Best regards
StarBootics
I suggest to add the Ternary operator like in C or C++ to PB language.
Code: Select all
int c1 = (x0 > y0) ? 32 : 0;
Code: Select all
Macro Interrogation(Variable, Test, If_True, If_False)
If Test
Variable = (If_True)
Else
Variable = (If_False)
EndIf
EndMacro
StarBootics