M MarkoMylo Member Licensed User Longtime User Oct 7, 2017 #1 I dont know why but i have some error when i try to emulate some code on my phone it stucks in this line tee = "ENGLAND" Label1.Text = tee.SubString2(1,1) i put in globals: dim tee as string gives me "PROGRAM PAUSED AT LINE" (where is label1.text = tee.substring2(1,1) Why????
I dont know why but i have some error when i try to emulate some code on my phone it stucks in this line tee = "ENGLAND" Label1.Text = tee.SubString2(1,1) i put in globals: dim tee as string gives me "PROGRAM PAUSED AT LINE" (where is label1.text = tee.substring2(1,1) Why????
NJDude Expert Licensed User Longtime User Oct 7, 2017 #2 Check the syntax for SubString2. If you want to show "ENG" do this: B4X: tee = "ENGLAND" Label1.Text = tee.SubString2(0,3) If you want just the "E" then do this: B4X: tee = "ENGLAND" Label1.Text = tee.SubString2(0,1) Upvote 0
Check the syntax for SubString2. If you want to show "ENG" do this: B4X: tee = "ENGLAND" Label1.Text = tee.SubString2(0,3) If you want just the "E" then do this: B4X: tee = "ENGLAND" Label1.Text = tee.SubString2(0,1)
imbault Well-Known Member Licensed User Longtime User Oct 7, 2017 #3 Anyway SubString(1,1) will return nothing '', see the doc about the 2 parameters (beg and end) Upvote 0