B bgi0065 Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #1 如何把一个String类型的字符串的第一个字符赋给Char类型的变量, 注意是Char类型而不是Pchar类型。
N nuke Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #2 pchar类型的其实可以和 array[0...xxx] of char 的字符型数组一样操作
S springm Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #3 var c:char; s:string; ........ c:=s[1];
T thtfsyh Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #4 procedure TForm1.Button1Click(Sender: TObject); var c:char; s:string; begin s:= 'sdfsdf'; c:=s[1]; edit1.text := c; end;
procedure TForm1.Button1Click(Sender: TObject); var c:char; s:string; begin s:= 'sdfsdf'; c:=s[1]; edit1.text := c; end;
A ArJianzeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-01 #5 var S :String ; C :Char ; I :Integer ; begin S :='sdjfeius'; for I :=0 to Length(S) do C :=S; end;
L LeonSu Unregistered / Unconfirmed GUEST, unregistred user! 2000-08-02 #7 var s:WideString;//一定要是WideString c:Char; ... begin ... s:='It is a sample!'; c:=char(s[1]);//c的值为I c:=char(s[2]);//c的值为t ... end; ...
var s:WideString;//一定要是WideString c:Char; ... begin ... s:='It is a sample!'; c:=char(s[1]);//c的值为I c:=char(s[2]);//c的值为t ... end; ...