Alessandro71 Well-Known Member Licensed User Longtime User Oct 9, 2021 #1 The following line compiles fine in B4A (i is the integer index in a For loop) B4X: Dim cellbyte As String = HexParser.Byte2Hex(0xAE + i) The compiler error is B4X: invalid suffix '+_i' on integer constant Same issue on this line: B4X: cellnumber = cellnumber - (0xAE - 0x40)
The following line compiles fine in B4A (i is the integer index in a For loop) B4X: Dim cellbyte As String = HexParser.Byte2Hex(0xAE + i) The compiler error is B4X: invalid suffix '+_i' on integer constant Same issue on this line: B4X: cellnumber = cellnumber - (0xAE - 0x40)
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2021 #2 This code compiles fine: B4X: Dim cellnumber As Int cellnumber = cellnumber - (0xAE - 0x40)
Alessandro71 Well-Known Member Licensed User Longtime User Oct 10, 2021 #3 Erel said: This code compiles fine: B4X: Dim cellnumber As Int cellnumber = cellnumber - (0xAE - 0x40) Click to expand... This is my output on a Release build Rich (BB code): B4i Version: 7.50 Parsing code. (0.70s) Building folders structure. (0.25s) Running custom action. (0.04s) Running custom action. (0.03s) Compiling code. (0.76s) Compiling layouts code. (0.03s) Building Xcode project. (0.94s) Preparing project for builder. (1.53s) Project size: 3.73 MB Sending data to remote compiler. Error B4i line: 5961 cellnumber = cellnumber - (0xAE - 0x40) invalid suffix '-0x40' on integer constant
Erel said: This code compiles fine: B4X: Dim cellnumber As Int cellnumber = cellnumber - (0xAE - 0x40) Click to expand... This is my output on a Release build Rich (BB code): B4i Version: 7.50 Parsing code. (0.70s) Building folders structure. (0.25s) Running custom action. (0.04s) Running custom action. (0.03s) Compiling code. (0.76s) Compiling layouts code. (0.03s) Building Xcode project. (0.94s) Preparing project for builder. (1.53s) Project size: 3.73 MB Sending data to remote compiler. Error B4i line: 5961 cellnumber = cellnumber - (0xAE - 0x40) invalid suffix '-0x40' on integer constant
Andrew (Digitwell) Well-Known Member Licensed User Longtime User Oct 10, 2021 #4 I get the same error. I got it to work by adding an extra pair of brackets B4X: Dim cellnumber As Int cellnumber = cellnumber - ((0xAE) - 0x40)
I get the same error. I got it to work by adding an extra pair of brackets B4X: Dim cellnumber As Int cellnumber = cellnumber - ((0xAE) - 0x40)
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2021 #5 Compiles fine here. I'm using a newer build that wasn't released yet. Please test it when the beta is released.
Compiles fine here. I'm using a newer build that wasn't released yet. Please test it when the beta is released.