dim $OutString, $i
for $i=128 to 143 ; -> 16 Chars
$OutString = $OutString + chr($i)
next
; Big Surprise
messagebox("Length of should be 16 but it is " + len($Outstring), "String Length")
; Now we split the loop to detect where the additional char is hiding
dim $OutString1, $OutString2, $OutString3, $OutString4
for $i=128 to 131 ; -> 4 Chars
$OutString1 = $OutString1 + chr($i)
next
for $i=132 to 135; -> 4 Chars
$OutString2 = $OutString3 + chr($i)
next
for $i=136 to 139; -> 4 Chars
$OutString3 = $OutString3 + chr($i)
next
for $i=140 to 143; -> 4 Chars
$OutString4 = $OutString4 + chr($i)
next
; Bigger Surprise :-)
messagebox("Length of $$Outstring should be 16 but it is " + len($Outstring) + @crlf +
"Length of $$Outstring1 should be 4 but it is " + len($Outstring1) + @crlf +
"Length of $$Outstring2 should be 4 but it is " + len($Outstring2) + @crlf +
"Length of $$Outstring3 should be 4 but it is " + len($Outstring3) + @crlf +
"Length of $$Outstring4 should be 4 but it is " + len($Outstring4), "String Length")
; Let's take a look on the content of $Outstring
for $i=1 to len($Outstring)
messagebox("This is the Asc-Value of Char #" + $i + " inside $$OutString: " + Asc(substr($Outstring, $i, 1)) + " (should be " + cstr($i + 127) + ")", "Asc()")
next