String variable

Hello!!
Is this piece of code correct? I don't know if is possible the allocation to "X" and "Message" because the operation that I do with them I don't know if they are correct or possible. The problem is that I don't get that the Serial Monitor shows me "Message" because the Serial.println doesn't run. What is the problem?? Thanks!!!

int valor = 2056;
String X= "";
String Message= "";
for (i= 0; i <2; i++)
{
      valor += valor+i;
      X += String (valor) + ",";
}
Message = "CA" + X + "@";
Serial.println (Message);
string X= "";

Where is the definition of the datatype "string"?

      X += sting (valor) + ",";

sting ?

Try here

UKHeliBob you have reason is a fail that I have written but in this forum, in the code is OK. So it isn't the problem, but thanks.
X+= String (valor) + ",";

AWOL, I don't understand it, what is the problem with the definition? X is a variable of type STRING that I initialize to "". What do you want to tell me?, because I don't understand your question. Thanks!

X is a variable of type STRING

No, it is a variable of type "string", and you haven't told us what a "string" is.

String X= "";

I think that here, at the begining of the first post is clear, are you agree? X is a String because in the declaration I have written String X = "";
The same with Message. Is it wrong declared?

I think that here, at the begining of the first post is clear, are you agree?

I agree now, but it didn't say that when you originally posted, did it? (see reply #1 which was cut from the original post)

So the code that was posted originally didn't compile, it was just something you typed between code tags, so it was just a waste of time.

Thanks - I will take no further part in this thread.

Ok, then, the code is correct. So I don't understand why the Serial.println (Message) doesn't run?

See reply #3

What is the problem?? Thanks!!!

Improper punctuation.

Perhaps the fine folks at http://snippets-r-us.com could help you with your snippets.