Dave O Well-Known Member Licensed User Longtime User May 7, 2023 #1 In B4A 12.20 (64-bit version), I'm having trouble converting a string to a long: The string is a UUID (e.g. "997203633536585465") which I generate by multiplying 2 random Ints. But assigning it to a Long variable yields the slightly different value of "997203633536585472", which feels like a casting error. Indeed, I found this 2021 thread about the string-to-long bug, with a workaround of casting to an intermediate Object. As long as I clean my project before compiling in debug mode, it works. Does this mean that the original string-to-long bug is still in B4A? Last edited: May 8, 2023
In B4A 12.20 (64-bit version), I'm having trouble converting a string to a long: The string is a UUID (e.g. "997203633536585465") which I generate by multiplying 2 random Ints. But assigning it to a Long variable yields the slightly different value of "997203633536585472", which feels like a casting error. Indeed, I found this 2021 thread about the string-to-long bug, with a workaround of casting to an intermediate Object. As long as I clean my project before compiling in debug mode, it works. Does this mean that the original string-to-long bug is still in B4A?
Erel B4X founder Staff member Licensed User Longtime User May 7, 2023 #2 The debug bug is still there. It shouldn't happen in release mode.