⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project2.dpr

📁 Delphi7数据库开发教程,包含该书21套实例
💻 DPR
字号:
program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

// 该函数将作为函数的第一个参数
function P1:Integer;
begin
  Writeln('P1');
  Result := 0;
end;

// 该函数将作为函数的第二个参数
function P2:Integer;
begin
  Writeln('P2 ') ;
  Result := 1;
end;

function MaxInt_pascal( Int1:Integer; Int2:Integer):Integer ;pascal;
begin
  if Int1 >= Int2 then
    Result  := Int1
  else
   Result := Int2;
end;

function MaxInt_stdcall( Int1:Integer; Int2:Integer):Integer ;stdcall;
begin
  if Int1 >= Int2 then
    Result  := Int1
  else
   Result := Int2;
end;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  writeln('Pascal call,参数从左向右传递');
  MaxInt_pascal(P1,P2);
  writeln('standard call,参数从右向左传递');
  MaxInt_stdcall(P1, P2) ;
  readln;
end.
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -