palmaf Member Licensed User Longtime User Feb 16, 2015 #1 I used the IIF function as described in the forum, but now compile i from this alert : Return type (Sub signature) should be set explicitly. How to correct ? Thanks this is the code Sub IIF(c As Boolean, TrueRes As String, FalseRes As String) If c Then Return TrueRes Else Return FalseRes End Sub
I used the IIF function as described in the forum, but now compile i from this alert : Return type (Sub signature) should be set explicitly. How to correct ? Thanks this is the code Sub IIF(c As Boolean, TrueRes As String, FalseRes As String) If c Then Return TrueRes Else Return FalseRes End Sub
eurojam Well-Known Member Licensed User Longtime User Feb 16, 2015 #2 I think you have to declare the return type: B4X: Sub IIF(c As Boolean, TrueRes As String, FalseRes As String) as string Upvote 0
I think you have to declare the return type: B4X: Sub IIF(c As Boolean, TrueRes As String, FalseRes As String) as string