Sign in to follow this  
Followers 0
mattfaust

how to write a string

4 posts in this topic

Could someone please provide an example of how to write a string to a variable.

for instance:

Case $btn1

$code = $code + "1"

Case $btn2

$code = $code + "2"

if btn1 and btn2 are pressed, I want $code to equal 12, not 3

thanks

Share this post


Link to post
Share on other sites



Could someone please provide an example of how to write a string to a variable.

for instance:

Case $btn1

$code = $code + "1"

Case $btn2

$code = $code + "2"

if btn1 and btn2 are pressed, I want $code to equal 12, not 3

thanks

Treat them as strings.

Case $btn1

$code &= "1"

Case $btn2

$code &= "2"

Share this post


Link to post
Share on other sites

ahh, thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0