modeswitches: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | Mode switches enable specific functionality and are enabled using the compiler directive {\$modeswitch name}. | |
| 2 | 2 | ||
| 3 | 3 | Free pascal supports the following mode switches. | |
| 4 | 4 | ||
| 5 | - | ||
| 6 | - | ||
| 7 | - | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 28 | - | ||
| 29 | - | ||
| 30 | - | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | - | ||
| 45 | - | ||
| 5 | + | ``` pascal | |
| 6 | + | m_class, { delphi class model } | |
| 7 | + | m_objpas, { load objpas unit } | |
| 8 | + | m_result, { result in functions } | |
| 9 | + | m_string_pchar, { pchar 2 string conversion } | |
| 10 | + | m_cvar_support, { cvar variable directive } | |
| 11 | + | m_nested_comment, { nested comments } | |
| 12 | + | m_tp_procvar, { tp style procvars (no @ needed) } | |
| 13 | + | m_mac_procvar, { macpas style procvars } | |
| 14 | + | m_repeat_forward, { repeating forward declarations is needed } | |
| 15 | + | m_pointer_2_procedure, { allows the assignement of pointers to | |
| 16 | + | procedure variables } | |
| 17 | + | m_autoderef, { does auto dereferencing of struct. vars } | |
| 18 | + | m_initfinal, { initialization/finalization for units } | |
| 19 | + | m_default_ansistring, { ansistring turned on by default } | |
| 20 | + | m_out, { support the calling convention OUT } | |
| 21 | + | m_default_para, { support default parameters } | |
| 22 | + | m_hintdirective, { support hint directives } | |
| 23 | + | m_duplicate_names, { allow locals/paras to have duplicate names of globals } | |
| 24 | + | m_property, { allow properties } | |
| 25 | + | m_default_inline, { allow inline proc directive } | |
| 26 | + | m_except, { allow exception-related keywords } | |
| 27 | + | m_objectivec1, { support interfacing with Objective-C (1.0) } | |
| 28 | + | m_objectivec2, { support interfacing with Objective-C (2.0) } | |
| 29 | + | m_nested_procvars, { support nested procedural variables } | |
| 30 | + | m_non_local_goto, { support non local gotos (like iso pascal) } | |
| 31 | + | m_advanced_records, { advanced record syntax with visibility sections, methods and properties } | |
| 32 | + | m_isolike_unary_minus, { unary minus like in iso pascal: same precedence level as binary minus/plus } | |
| 33 | + | m_systemcodepage, { use system codepage as compiler codepage by default, emit ansistrings with system codepage } | |
| 34 | + | m_final_fields, { allows declaring fields as "final", which means they must be initialised | |
| 35 | + | in the (class) constructor and are constant from then on (same as final | |
| 36 | + | fields in Java) } | |
| 37 | + | m_default_unicodestring, { makes the default string type in $h+ mode unicodestring rather than | |
| 38 | + | ansistring; similarly, char becomes unicodechar rather than ansichar } | |
| 39 | + | m_type_helpers, { allows the declaration of "type helper" for all supported types | |
| 40 | + | (primitive types, records, classes, interfaces) } | |
| 41 | + | m_blocks, { support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension) } | |
| 42 | + | m_isolike_io, { I/O as it required by an ISO compatible compiler } | |
| 43 | + | m_isolike_program_para, { program parameters as it required by an ISO compatible compiler } | |
| 44 | + | m_isolike_mod, { mod operation as it is required by an iso compatible compiler } | |
| 45 | + | m_array_operators, { use Delphi compatible array operators instead of custom ones ("+") } | |
| 46 | + | m_multi_helpers { helpers can appear in multiple scopes simultaneously } | |
| 47 | + | ``` | |
| 46 | 48 | ||
| 47 | 49 | ## See also | |
| 48 | 50 | ||
| 49 | 51 | - [[Compiler Mode]] | |
| 50 | 52 | - [[modeswitch]] | |
| 51 | 53 | ||
| 52 | 54 | --- | |
| 53 | 55 | *From the Free Pascal wiki, page "modeswitches", 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](/wiki-contact).* | |
| 54 | 56 | Category: FPC | |
| 55 | 57 | Category: Modes |
