procedure TForm1.Button1Click(Sender: TObject);
begin
if self.Edit6.Text = 'a ' then//是这里吗,不可以 = ‘A‘吗,该怎样修改
edit7.Text := edit2.Text
else
if self.Edit6.Text = 'b' then
edit7.Text := edit3.Text
else
if self.Edit6.Text = 'c' then
edit7.Text := edit4.Text;
end;
请帮我看看是什么原因
begin
if self.Edit6.Text = 'a ' then//是这里吗,不可以 = ‘A‘吗,该怎样修改
edit7.Text := edit2.Text
else
if self.Edit6.Text = 'b' then
edit7.Text := edit3.Text
else
if self.Edit6.Text = 'c' then
edit7.Text := edit4.Text;
end;
请帮我看看是什么原因
if AnsiLowerCase(self.Edit6.Text) = 'a' then
begin
if self.Edit6.Text = 'a ' then//是这里吗,不可以 = ‘A‘吗,该怎样修改
edit7.Text := edit2.Text
else
if self.Edit6.Text = 'b' then
edit7.Text := edit3.Text
else
if self.Edit6.Text = 'c' then
edit7.Text := edit4.Text;
end;
Edit6.Text -> Trim(Edit6.Text);
'a ' -> 'a';
大写就是大写,小写就是小写;
不用写self;
begin
if Edit6.Text = 'a ' then//是这里吗,不可以 = ‘A‘吗,该怎样修改
edit7.Text := edit2.Text
else
if Edit6.Text = 'b' then
edit7.Text := edit3.Text
else
if Edit6.Text = 'c' then
edit7.Text := edit4.Text;end;
是Edit6.Text = 'a'而不是Edit6.Text = 'a ',self可以不要。
if AnsiLowerCase(self.Edit6.Text) = 'a' then
uses strUtils
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit6.Text = 'a' then//是这里吗,不可以 = ‘A‘吗,该怎样修改
edit7.Text := edit2.Text
else
if Edit6.Text = 'b' then
edit7.Text := edit3.Text
else
if Edit6.Text = 'c' then
edit7.Text := edit4.Text;end;
是Edit6.Text = 'a'而不是Edit6.Text = 'a ',self可以不要。