Форум: "Основная";
Текущий архив: 2002.02.28;
Скачать: [xml.tar.bz2];
ВнизПодскажите, как в Delphi6 вызвать из одной процедуры другую? Найти похожие ветки
← →
Андрей Сенченко (2002-02-11 11:22) [7]>> PVOzerski © (11.02.02 11:09)
>> мере в BP вместо forward можно было писать external
А что нам скажут по F1 в BP 7.0. ? Вот что скажут:
forward (procedure directive)
With a forward declaration, you can make a procedure or function known without actually specifying its statement part.
From the point of the forward declaration, other procedures and functions can call the forwarded routine, making mutual recursion possible.
Somewhere after a forward declaration, the procedure or function must be defined by a declaration that specifies the statement part of the routine.
The defining declaration can omit the parameter list from the procedure or function header.
Example:
(* Forwarded procedure *)
procedure Flip(N: Integer); forward;
procedure Flop(N: Integer);
begin
WriteLn("Flop");
if N > 0 then Flip(N - 1);
end;
procedure Flip;
begin
WriteLn("Flip");
if N > 0 then Flop(N - 1);
end;
external (procedure directive)
External declarations allow you to interface with separately compiled procedures and functions written in assembly language.
The external code is linked with the Pascal unit or program through $L filename compiler directives.
In procedures and functions imported from DLLs, the external directive takes the place of the declaration and statement parts that would otherwise be present.
Examples:
function GetMode: Word; external;
procedure SetMode(Mode: Word); external; $L CURSOR.OBJ
function GlobalAlloc(Flags: Word; Bytes: Longint): THandle; far; external
"KERNEL" index 15;
А что нам скажет букварь Фаронова по TP 5.0 ? Да примерно тоже самое, единственное что про DLL там конечно не упомянуто.
... No comments
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.02.28;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.004 c