> -----Original Message-----
> From: gajo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 16 February 2000 23:29
> To: Multiple recipients of list delphi
> Subject: [DUG]: String -> Char
>
>
> I have a string, for example "test"..
> Now I want to take the t letter out and convert it to number..
> But to do this I have to convert that t string to char.. how can I do
> this?
> And how can I convert a char to string?
>
> Gajo
var
mystr : string;
mychar : char;
mynum : integer;
...
mystr := 'test';
mychar := mystr[1]; // t
mynum := ord(mychar); // 116
does that help?
Steve
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz