Sign in Join
Wiki copytemporary

IDE Window: Conditional Defines: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-Utility to assist in inserting conditional defines. For example, to convert
2-```
3-OnCreate := @CreateHandler
4-```
1+Utility to assist in inserting conditional defines. For example, to convert
52
6-to:
7-```
8-OnCreate := {$IFDEF FPC} @ {$ENDIF} CreateHandler
3+``` pascal
4+ OnCreate := @CreateHandler
95```
106
11-select **@** and then use **Edit** , insert **$IFDEF** (default shortcut Ctrl+Shift+D), select "FPC,NONE" and hit return. If you select one or more complete lines then the conditional defines are put on sepearate lines as in:
7+to:
8+
9+``` pascal
10+ OnCreate := {$IFDEF FPC} @ {$ENDIF} CreateHandler
1211```
13-{$IFDEF DEBUG}
14- Writeln('State= ', State)
15- {$ENDIF}
12+
13+select **@** and then use **Edit**, insert **\$IFDEF** (default shortcut Ctrl+Shift+D), select "FPC,NONE" and hit return. If you select one or more complete lines then the conditional defines are put on sepearate lines as in:
14+
15+``` pascal
16+ {$IFDEF DEBUG}
17+ Writeln('State= ', State)
18+ {$ENDIF}
1619```
1720
18-The choices are listed in abbreviated form so:
21+The choices are listed in abbreviated form so:
1922
20- * MSWINDOWS,UNIX => {$IFDEF MSWINDOWS} ... {$ENDIF} {$IFDEF UNIX} ... {$ENDIF}
21- * FPC,ELSE => {$IFDEF FPC} ... {$ELSE} ... {$ENDIF}
22- * DEBUG,NONE => {$IFDEF DEBUG} ... {$ENDIF}
23+- MSWINDOWS,UNIX =\> {\$IFDEF MSWINDOWS} ... {\$ENDIF} {\$IFDEF UNIX} ... {\$ENDIF}
24+- FPC,ELSE =\> {\$IFDEF FPC} ... {\$ELSE} ... {\$ENDIF}
25+- DEBUG,NONE =\> {\$IFDEF DEBUG} ... {\$ENDIF}
2326
24-This tool is most useful when you need to put several identical conditionals in a file, you can add to the possible conditionals by selecting or typing the required symbols in "First test" and /or "Second test" and using the **Add** button.
27+This tool is most useful when you need to put several identical conditionals in a file, you can add to the possible conditionals by selecting or typing the required symbols in "First test" and /or "Second test" and using the **Add** button.
2528
2629Your additons are saved in the condef.xml file in the lazarus configuration directory.
2730
2831---
29-*From the Free Pascal wiki, page "IDE Window: Conditional Defines", as the Internet Archive kept it on 2023-09-24. 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).*
32+*From the Free Pascal wiki, page "IDE Window: Conditional Defines", as it stood on 2020-02-17 after a change by Trev, 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).*

Back to history