MarcoRome Expert Licensed User Longtime User Dec 12, 2023 #1 Hi All. I have this code: B4X: Dim g_pro As Double g_pro = (1300 * (50/100)) / 4 Log(g_pro) Log(Round(g_pro)) And i have this result in B4A ( 163 ) B4i ( 162 ) Any suggestion. Thank you
Hi All. I have this code: B4X: Dim g_pro As Double g_pro = (1300 * (50/100)) / 4 Log(g_pro) Log(Round(g_pro)) And i have this result in B4A ( 163 ) B4i ( 162 ) Any suggestion. Thank you
MarcoRome Expert Licensed User Longtime User Dec 12, 2023 #2 MarcoRome said: Hi All. I have this code: B4X: Dim g_pro As Double g_pro = (1300 * (50/100)) / 4 Log(g_pro) Log(Round(g_pro)) And i have this result in B4A ( 163 ) View attachment 148599 B4i ( 162 ) View attachment 148600 Any suggestion. Thank you Click to expand... Found Solution: Round2 in B4i Hi, I don't find Round2 in the B4i. Can you help me? Thanks... www.b4x.com Click to expand... B4X: Sub RoundUpNumberFormat(d As Double, integers As Int, fractions As Int) As String Return NumberFormat(d + 0.0000001, integers, fractions) End Sub Last edited: Dec 12, 2023 Upvote 0
MarcoRome said: Hi All. I have this code: B4X: Dim g_pro As Double g_pro = (1300 * (50/100)) / 4 Log(g_pro) Log(Round(g_pro)) And i have this result in B4A ( 163 ) View attachment 148599 B4i ( 162 ) View attachment 148600 Any suggestion. Thank you Click to expand... Found Solution: Round2 in B4i Hi, I don't find Round2 in the B4i. Can you help me? Thanks... www.b4x.com Click to expand... B4X: Sub RoundUpNumberFormat(d As Double, integers As Int, fractions As Int) As String Return NumberFormat(d + 0.0000001, integers, fractions) End Sub