![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
Опции темы | Поиск в этой теме |
![]() |
#1 |
Регистрация: 02.06.2011
Сообщений: 3
|
![]()
Помогите пожалуйста написать процедуру метода. Сама никак не пойму что к чему относится!
![]() Текст прграммы Unit 1: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Unit2; type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Button1: TButton; Edit4: TEdit; Label4: TLabel; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var reg:Treg; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin reg:= Treg.Create; reg.FIO:= Edit1.Text; reg.name:=Edit2.Text; reg.mail:=Edit3.Text; reg.registracia; Edit4.Text:=reg.count; end; end. Текст программы Unit2: unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type Treg=class protected FFIO: string; Fname : string; Fmail:string; Fcount:integer; Fmassiv; function GetFIO:string; //procedure SetFIO(Value: string); function Getname: string; //procedure Setname(Value: String); function Getmail:string; //procedure Setmail(Value: string); procedure SetCount(Value: Integer); //function GetCount: Integer; public Constructor Create; property FIO:string read GetFIO; property name:string read Getname; property mail:string read Getmail; property Count: integer read GetCount write Setcount; procedure registracia; end; implementation Constructor Treg.Create; begin end; function reg.GetFIO: String; begin Result := FFIO; end; function reg.Getname: string; begin Result:=Fname; end; function reg.Getmail: string; begin Result:=Fmail; end; procedure reg.SetCount(Value: Integer); begin FCount:= Value; end; //function reg.GetCount: Integer; //begin Result:= FCount; end; =================================== //процедура метода end. end. |
![]() |
![]() |
![]() |
#2 | |
C++
Форумчанин
Регистрация: 27.03.2011
Сообщений: 803
|
![]() Цитата:
Ищете информацию по C++?
cplusplus.com |
|
![]() |
![]() |
![]() |
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Правильно ли написана процедура для Java native метода? | LexaL | Общие вопросы Delphi | 0 | 04.05.2011 16:43 |
DELPHI (3 метода нахождения площади многоугольника)!!! | Miss Brunet | Помощь студентам | 1 | 22.12.2010 14:15 |
Процедура на строку(Delphi) | blizzard | Помощь студентам | 5 | 16.01.2008 18:33 |
процедура ping в Delphi | xTANATOSx | Общие вопросы Delphi | 3 | 11.10.2007 10:32 |