Android Question Convert received text to numbers

IslamQabel

Active Member
Licensed User
Longtime User
Hi..
I am sending numbers from micro-controller as text and read it in my app as text, the question is...How to convert received numbers which is text to real number ..
for example:

send "12" and receive it as "12"...i want to convert it to 12 (number) which can be recognized by B4A as a number
thanks
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
dim text as string = "12"
dim value as int = text

or maybe just
B4X:
dim value as int = "12"
 
Upvote 0

IslamQabel

Active Member
Licensed User
Longtime User
note that the received text is not fixed value...it can be any number

let say:
dim y as string
y=Label1.text

i want to convert the received text to recognized number by B4A, the received text is random not fixed value
 
Upvote 0
Top