P ProfJannes Member Licensed User Longtime User Mar 20, 2012 #1 How does one convert an integer to a string?
P Penko Active Member Licensed User Longtime User Mar 20, 2012 #2 No need to convert, just define a String variable. B4X: Dim str As String : str = "String" Dim num as Int : num = 5 str = num ' there is no type casting in B4A, it's all done automatically Upvote 0
No need to convert, just define a String variable. B4X: Dim str As String : str = "String" Dim num as Int : num = 5 str = num ' there is no type casting in B4A, it's all done automatically
S susu Well-Known Member Licensed User Longtime User Mar 20, 2012 #3 Try this trick: B4X: Dim number as Int Dim str as String number = 1234 str = "this is string" & number Upvote 0
Try this trick: B4X: Dim number as Int Dim str as String number = 1234 str = "this is string" & number
J Jost aus Soest Active Member Licensed User Longtime User Mar 20, 2012 #4 For a better reading code you could also use a VB-like function like this: B4X: Sub CStr(i As Int) As String Return "" & i End Sub 'Example: n = 123 s = "Text bla bla " & CStr(n) Upvote 0
For a better reading code you could also use a VB-like function like this: B4X: Sub CStr(i As Int) As String Return "" & i End Sub 'Example: n = 123 s = "Text bla bla " & CStr(n)
P ProfJannes Member Licensed User Longtime User Mar 20, 2012 #5 Thank you very much Thanks guys, problem solved Upvote 0
P Penko Active Member Licensed User Longtime User Mar 20, 2012 #6 Jost, das ist sehr sehr wie VB6. Alte Erinnerungen... Jost, this is very very VB6-like. Old memories... Upvote 0
Jost, das ist sehr sehr wie VB6. Alte Erinnerungen... Jost, this is very very VB6-like. Old memories...
J Jost aus Soest Active Member Licensed User Longtime User Mar 20, 2012 #7 Classic VB... Penko said: Jost, das ist sehr sehr wie VB6. Alte Erinnerungen... Jost, this is very very VB6-like. Old memories... Click to expand... Aber für mich ist das VB5-Stil... (VB6 habe ich nie professionell genutzt. Ich benutze VB5 immer noch für kleine Windows-Anwendungen.) But for me it's VB5-style... (I've never professionaly used VB6. I'm still using VB5 for small Windows applications.) Last edited: Mar 20, 2012 Upvote 0
Classic VB... Penko said: Jost, das ist sehr sehr wie VB6. Alte Erinnerungen... Jost, this is very very VB6-like. Old memories... Click to expand... Aber für mich ist das VB5-Stil... (VB6 habe ich nie professionell genutzt. Ich benutze VB5 immer noch für kleine Windows-Anwendungen.) But for me it's VB5-style... (I've never professionaly used VB6. I'm still using VB5 for small Windows applications.)