Jump to content
Sign in to follow this  
mattfaust

how to write a string

Recommended Posts

mattfaust

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
weaponx

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.