read first character


[ DelphiLand FAQ ]

Posted by matt on July 28, 2004 at 00:45:52:

ok easy i think but im stumped. i read from a text file. the number is 2323. it is displayed in label1.caption. now::::: i want to read the third character in 2323 ..it would be 2. I can understand how to do it but it has to be text. i want to read numbers.

var
  Initial : string;
begin
  Name:= 'dd';
  Initial:=Name[1];
  showmessage (Initial);

this works if label1.caption contains letters not numbers. how do i get the numbers to work.


Related Articles and Replies


[ DelphiLand FAQ ]