Вниз
Скачать: CL | DM;

Создание и использование своего юнита с процедурами и функциями   Найти похожие ветки 

 
allrussia   (2006-06-03 20:00) [0]

unit Imp;

interface

uses SysUtils, Windows, Forms, Dialogs;

type TImp = class (TOBject)
 protected
   function AddS: integer;
 public
   function AddX: integer;
 end;

implementation

uses Unit1;

function TImp.AddS: integer;
begin
result := 1;
end;

function TImp.AddX: integer;
begin
result := 1;
end;

end.


Нужно чтобы я мог подключить этот юнит к проекту и спользовать функции

получается только так:
with TImp.Create do Addx;

а мне нужно просто Addx

что я не так делаю. спасибо


 
antonn ©   (2006-06-03 20:05) [1]

может так?
без классов и объектов:
unit Imp;

interface

uses SysUtils, Windows, Forms, Dialogs;

 function AddS: integer;

implementation

function AddS: integer;
begin
result := 1;
end;

end.


 
Iehbr ©   (2006-06-03 20:08) [2]

unit MyUnit;

interface
function AddS : Integer;
implementation
Function AddS : Integer;
 begin
   Result := 1;
 end;
end.


 
Iehbr ©   (2006-06-03 20:10) [3]


> antonn ©   (03.06.06 20:05) [1]


опередил :)


 
antonn ©   (2006-06-03 20:11) [4]

Iehbr ©   (03.06.06 20:10) [3]
ага:)
а еще я тегами пользуюсь ;)


 
allrusia   (2006-06-03 20:14) [5]

antonn, Iehbr

Спасибо за оперативный ответ!



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.025 c
2-1149671044
NightCold
2006-06-07 13:04
2006.06.25
PARADOx


2-1149760224
kitti
2006-06-08 13:50
2006.06.25
C++Builder


6-1139817774
Anton_123
2006-02-13 11:02
2006.06.25
Delphi, Web & RealVideo


15-1148836161
Efir
2006-05-28 21:09
2006.06.25
Эфиродинамика


15-1148914623
ArtemESC
2006-05-29 18:57
2006.06.25
"Квакеры"




   Наверх