baron159 Member Licensed User Longtime User Jun 2, 2012 #1 Ok so I have a two part question. Ane let me start off by saying I have been programming in Microsoft Visual Basic for the past 3 months and I have forgot many of the different code types in B4A and I just started getting into the swing of things. Q#1: How do I convert a Double to a String like in the following code? dim num as Double textbox.text = num Q#2: In Visual Basic this is a conversion method that allows you to change any number to a string and into a currency. Is their a way to do this in B4A? VBCODE: dim num as Double = 2000 textbox.text = num.ToString("C2") output is: $2000.00 So sorry for the dumb question it's just that I forgot everything because I was in a different language. Thanks Again: -baron159
Ok so I have a two part question. Ane let me start off by saying I have been programming in Microsoft Visual Basic for the past 3 months and I have forgot many of the different code types in B4A and I just started getting into the swing of things. Q#1: How do I convert a Double to a String like in the following code? dim num as Double textbox.text = num Q#2: In Visual Basic this is a conversion method that allows you to change any number to a string and into a currency. Is their a way to do this in B4A? VBCODE: dim num as Double = 2000 textbox.text = num.ToString("C2") output is: $2000.00 So sorry for the dumb question it's just that I forgot everything because I was in a different language. Thanks Again: -baron159
pluton Active Member Licensed User Longtime User Jun 2, 2012 #2 Hi Baron159 Look at this post: 14976-converting-double-string Upvote 0
pluton Active Member Licensed User Longtime User Jun 2, 2012 #4 baron159 said: Q#1: How do I convert a Double to a String like in the following code? dim num as Double textbox.text = num Click to expand... Something like this. I write this from my mind because I didn't start B4A now Code: Copy Dim tstring As String Dim num As Double textbox.text = tstring tstring = num 'something do with this double number textbox2.text = ("Double is: " &num) Upvote 0
baron159 said: Q#1: How do I convert a Double to a String like in the following code? dim num as Double textbox.text = num Click to expand... Something like this. I write this from my mind because I didn't start B4A now Code: Copy Dim tstring As String Dim num As Double textbox.text = tstring tstring = num 'something do with this double number textbox2.text = ("Double is: " &num)
rbsoft Active Member Licensed User Longtime User Jun 3, 2012 #5 Check this thread: http://www.b4x.com/forum/basic4andr...93-how-convert-string-integer.html#post104036 Rolf Upvote 0
Check this thread: http://www.b4x.com/forum/basic4andr...93-how-convert-string-integer.html#post104036 Rolf