Add the sub to your project and you can use it. No need to change the core.
You can also make a small library out of it and use the newly created library in your project(s).
Yes, but this is not a favorite utility. IIF has been core to MS Basic since - Forever? - For thirty years it has been just THERE. Are there popular versions of Basic that DON'T have IIF (Besides B4X)?
Yes, but this is not a favorite utility. IIF has been core to MS Basic since - Forever? - For thirty years it has been just THERE. Are there popular versions of Basic that DON'T have IIF (Besides B4X)?
B4X is not VB6; in this there were also other functions that do not exist in B4X (eg InStrRev, Left, Right, Space... to mention only string functions) or have different names.
B4X is not VB6; in this there were also other functions that do not exist in B4X (eg InStrRev, Left, Right, Space... to mention only string functions) or have different names.
Yes, but there are easy B4X solutions to all of those and, (I think) those are all used relatively infrequently. IIF is not. You know MS finally even added IIF to SQL server. As I understand it is simply converted to a CASE statement in the background which is ANSII compatible. But code is so much more readable with an IIF rather than a case.
1 - it is better to use a variable, not a UI element (keep graphics and data/logic separate)
2 - it is better not to use literals (10 and "Invalid number")
I always have to work hard to teach you the basics of programming; when will you learn? ?