Page 1 of 1

changing string into array

PostPosted: October 25th, 2008, 3:32 pm
by mac1234mac
Hello,

I have following string:

'abcd -9.456 on'

I'd like to divide this string into array of symbols so, for example, first element of my array would
be: a[0] := a, second a[1] := b etc. How can I do it in Delphi 7.0?.

Cheers.

PostPosted: October 25th, 2008, 7:52 pm
by Kambiz
You can index a string variable just as you would an array.

Index of the first character is 1, the second is 2, and so on.

Re: changing string into array

PostPosted: November 19th, 2008, 12:02 pm
by jdraver
maybe take a look at http://www.delphibasics.co.uk/RTL.asp?Name=Array

nice little site with basics !