Starchild Active Member Licensed User Longtime User Mar 28, 2016 #1 I am just starting to use the B4i development suite. Tried converting some code from B4A. I ALWAYS get a compiler error when using a return type of CHAR. Sometimes the error talks about UniCharValue type not in NSnumber ... So. I started a new empty project. It compiles fine. Then I add Sub ABC as CHAR end sub It does NOT compile. The actual error report is in the attached file CompileError.txt Is CHAR type not supported in B4i? I can pass a parameter of CHAR type without error. Can someone please advise. I am using B4i v2.51 Attachments CompileError.txt 11 KB · Views: 199 Last edited: Mar 29, 2016
I am just starting to use the B4i development suite. Tried converting some code from B4A. I ALWAYS get a compiler error when using a return type of CHAR. Sometimes the error talks about UniCharValue type not in NSnumber ... So. I started a new empty project. It compiles fine. Then I add Sub ABC as CHAR end sub It does NOT compile. The actual error report is in the attached file CompileError.txt Is CHAR type not supported in B4i? I can pass a parameter of CHAR type without error. Can someone please advise. I am using B4i v2.51
JanPRO Well-Known Member Licensed User Longtime User Mar 28, 2016 #2 I don't know why it doesn't work, but you can set the return type to a string and pass a char: B4X: Sub LetterA As String Return Chr(65) End Sub Jan Upvote 0
I don't know why it doesn't work, but you can set the return type to a string and pass a char: B4X: Sub LetterA As String Return Chr(65) End Sub Jan
Starchild Active Member Licensed User Longtime User Mar 29, 2016 #3 Thanks. I understand how the STRING type can be used as an alternative to CHAR. In order to preserve code compatibility between B4A and B4i, I am interested why the CHAR type is not being supported in B4i as a Sub Return type. Upvote 0
Thanks. I understand how the STRING type can be used as an alternative to CHAR. In order to preserve code compatibility between B4A and B4i, I am interested why the CHAR type is not being supported in B4i as a Sub Return type.
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2016 #4 It is a bug. It is fixed for the next version. Upvote 0