看你还有什么话好说!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
CFGMS=record
C: array[1..4] of String;
F: array[1..4] of String;
G: array[1..4] of String;
M: array[1..4] of String;
S: array[1..4] of String;
end;
var
Form1: TForm1;
Scro:CFGMS;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Scro.C[1] := '****'
// 如果不给Scro.C[1]赋初值则其值当然为空!!!!!!!!
if Trim(Scro.C[1])<>'' then
Caption := '**** it Ok'
else
Caption := 'No Power';
end;
end.