Heinz
02-13-2007, 04:03 PM
I have a problem with a unwanted type conversion in the following case:
string$="Test 111";
c$="";
c$=c$+chr(string$[6]); // c$="1"
c$=c$+chr(string$[7]); // c$=2 and not "11" !
c$=c$+chr(string$[8]); // c$=3 and not "111"
The example above is a bit simplified part of a parser and what I would like to do is copy the numbers digit by digit into the string c$. The first digit works fine and according to the watch window the variable type is character as it should be however when he should append the second "1" he suddenly converts both character variables into integer variables and adds them together :((
Any ideas why the variables are converted respectively how I could avoid the conversion in this case?
string$="Test 111";
c$="";
c$=c$+chr(string$[6]); // c$="1"
c$=c$+chr(string$[7]); // c$=2 and not "11" !
c$=c$+chr(string$[8]); // c$=3 and not "111"
The example above is a bit simplified part of a parser and what I would like to do is copy the numbers digit by digit into the string c$. The first digit works fine and according to the watch window the variable type is character as it should be however when he should append the second "1" he suddenly converts both character variables into integer variables and adds them together :((
Any ideas why the variables are converted respectively how I could avoid the conversion in this case?