Hi Rob, your program is simple enough, and it probably is working just fine, it's just that you haven't put the result anywhere where you can see it. If you were to add a label you could output it to the label, or you can log it back to the B4a IDE on your computer.
add a label to your layout and add the following code:
label1.text=result
or send it back to the log screen. On the right hand panel of the IDE at the bottom you'll see an option for logging. in your code add the following:
Log(result)
or if you want to label the output string add:
Log("the result is = " & result)