В чем здесь ошибка? Первый раз занялся классами, чего-то не понимаю.
Помогите чайнику!
- Код: Выделить всё
- unit Unit1;
 {$mode objfpc}{$H+}
 interface
 uses
 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
 type
 { TForm1 }
 TForm1 = class(TForm)
 Button1: TButton;
 procedure Button1Click(Sender: TObject);
 private
 { private declarations }
 public
 { public declarations }
 end;
 Tbuf = array[0..255] of word;
 TMyClass = class
 private
 { private declarations }
 public
 { public declarations }
 buf : Tbuf;
 procedure Clear;
 end;
 var
 Form1: TForm1;
 My1 : TMyClass;
 implementation
 {$R *.lfm}
 procedure TMyClass.Clear;
 var
 i : integer;
 begin
 for i := 0 to 255 do buf[i] := 0;
 end;
 procedure TForm1.Button1Click(Sender: TObject);
 begin
 My1.Clear;
 end;
 end.





