{$MODE Delphi}编译命令 ( 积分: 50 )

  • 主题发起人 主题发起人 gm88
  • 开始时间 开始时间
G

gm88

Unregistered / Unconfirmed
GUEST, unregistred user!
下了一个控制台程序,编译器在{$MODE Delphi}这一条上过去不去了。谁知道怎么回事?
program ABC;

{$MODE Delphi}

uses
 
提示什么?
 
刪了哪句话
 
$MODE DELPHI switch tries to emulate, as closely as possible, the behavior of Delphi 4. On the command-line, this mode is selected by the -Mdelpih switch.

You can not use the address operator to assign procedural variables.
A forward declaration must not be repeated exactly the same by the implementation of a function/procedure. In particular, you not omit the parameters when implementing the function or procedure.
Overloading of functions is not allowed.
Nested comments are not allowed.
The Objpas unit is loaded right after the system unit. One of the consequences of this is that the type Integer is redefined as Longint.
Parameters in class methods can have the same names as class properties (although it is bad programming practice).
 
如果你是使用Delphi开发的话还是把{$MODE Delphi}去掉把。
这个编译开关是FreePascal的便宜开关,表示源代码是Delphi兼容模式的。
FreePascal是一个跨几乎所有平台的Pascal编译器,和Delphi高度兼容。
{$MODE Delphi}在Delphi中不会被识别的。可以去掉。
 
谢谢楼上的大哥!
 

Similar threads

D
回复
0
查看
851
DelphiTeacher的专栏
D
D
回复
0
查看
862
DelphiTeacher的专栏
D
后退
顶部