1
I have the following component Memo
with the texts:
200:80
177:3306
I need to put this text inside a array, for example, based on the first line, the text 200 (would be array[1]
) and the countryside 80 (would be array[2]
). Remembering that I need to use as a delimiter the :
(two points), and in the sequence traverse that same and show in a ShowMessage
.
I can’t do it at all.
@user7605
ShowMessage(Numeros.Text);
?– stderr
sorry, I said wrong. Memo has several lines, it is showing only the first in the showmessage, understand ?
– user7605
@user7605
ShowMessage(Numeros[0]);
will show the first item of array,ShowMessage(Numeros.Text);
will show all items contained in this array. TheMemo1.Lines.Add(...)
is just one example.– stderr
@user7605 In the example above, to show the value 80, you do:
ShowMessage(Numeros[1]);
and so on...– stderr
thanks for the patience. Is there a way if I put it like this: Showmessage(Numbers[0]); it show all of that array at once ? Like, show one, I give OK, in sequence shows another and so on ?
– user7605
@user7605 I updated the answer, see if this is it.
– stderr
Perfect friend, thank you!
– user7605