标题:今天休息 无内容
取消只看楼主
超级新手
Rank: 2
等 级:论坛游民
帖 子:185
专家分:59
注 册:2006-2-9
结帖率:100%
 问题点数:0 回复次数:0 
今天休息 无内容

unit str;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);

private

{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if (Edit1.Text > Edit2.Text) then
MessageDlg('A>B',mtInformation,[mbOk], 0)
else if (Edit1.Text = Edit2.Text) then
MessageDlg('A=B',mtInformation,[mbOk], 0)
else if (Edit1.Text < Edit2.Text) then
MessageDlg('A<B',mtInformation,[mbOk], 0);
end;

procedure TForm1.Button2Click(Sender: TObject);
VAR S:string;
Substr:string;
begin
S:=Edit1.Text;
Substr:=Edit2.Text;

Button2.Caption:=inttostr(AnsiPos(Substr, S));
end;

end.

搜索更多相关主题的帖子: 休息 
2006-02-12 16:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-45260-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.192784 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved