Sign in Join
Wiki copytemporary

modeswitches/zh CN

English · 中文(中国)

模式开关允许特定的功能,并使用编译器指令 `{$modeswitch name}` 来启用它们。

Free Pascal 支持以下模式开关。

模式开关 描述
m_class { Delphi 类模型 }
m_objpas { 加载 objpas 单元 }
m_result { 函数中的 result 标识符 }
m_string_pchar { pchar 到 string 的自动转换 }
m_cvar_support { 支持 cvar 变量指令 }
m_nested_comment { 支持嵌套注释 }
m_tp_procvar { 支持 tp 风格的过程变量(无需 @ 符号)}
m_mac_procvar { 支持 macpas 风格的过程变量 }
m_repeat_forward { 需要重复的前向声明 }
m_pointer_2_procedure { 允许将指针分配给过程变量 }
m_autoderef { 对结构体变量进行自动解引用 }
m_initfinal { 单元的初始化和终结 }
m_default_ansistring { 默认启用 ansistring }
m_out { 支持 OUT 调用约定 }
m_default_para { 支持默认参数 }
m_hintdirective { 支持提示指令 }
m_duplicate_names { 允许局部变量/参数与全局变量具有相同的名称 }
m_property { 允许使用属性 }
m_default_inline { 允许使用内联过程指令 }
m_except { 允许与异常相关的关键字 }
m_objectivec1 { 支持与 Objective-C (1.0) 接口 }
m_objectivec2 { 支持与 Objective-C (2.0) 接口 }
m_nested_procvars { 支持嵌套的过程变量 }
m_non_local_goto { 支持非本地 goto(如 ISO Pascal)}
m_advanced_records { 带有可见性部分、方法和属性的高级记录语法 }
m_isolike_unary_minus { 像 ISO Pascal 一样的一元减号:与二元减号/加号具有相同的优先级 }
m_systemcodepage { 默认使用系统代码页作为编译器代码页,并使用系统代码页发出 ansistrings }
m_final_fields { 允许声明字段为 "final",这意味着它们必须在(类)构造函数中初始化,并且从那时起是常量(与 Java 中的 final 字段相同)}
m_default_unicodestring { 在 $h+ 模式下,默认字符串类型为 unicodestring 而不是 ansistring;类似地,char 变为 unicodechar 而不是 ansichar }
m_type_helpers { 允许为所有支持的类型(原始类型、记录、类、接口)声明 "类型助手" }
m_blocks { 支持 http://en.wikipedia.org/wiki/Blocks_(C_language_extension) }
m_isolike_io { ISO 兼容编译器所需的 I/O }
m_isolike_program_para { ISO 兼容编译器所需的程序参数 }
m_isolike_mod { ISO 兼容编译器所需的 mod 操作 }
m_array_operators { 使用与 Delphi 兼容的数组运算符,而不是自定义的 ("+") }
m_multi_helpers { 助手可以在多个作用域中同时出现 }

另请参阅


From the Free Pascal wiki, page "modeswitches/zh CN", as it stood on 2024-05-03 after a change by Hieroly, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 1 person, 2024

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
HierolyCreated page
Hieroly
Hieroly

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.