Jump to content

Multiply letters.. what's wrong?

Recommended Posts

Hi there,

I made this little test script to multiply a letter (A) 5 times. So, when string is A it should return AAAAA.

$string = "A"
$i = 1
$max = 5
While $i <= $max
    $i = $i + 1
    $string = $string & $string
MsgBox(0, "", $string)

However, it returns "AAAAAAAAAAAAAAAA". Isn't that strange? It should return "AAAAA"?

Edited by tom13
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...