Overview
| Artifact ID: | 9b07e2b6b21de2fe0c4fe450ed3fc13bdcc93f49 |
|---|---|
| Ticket: | 793779ffffffffffffffffffffffffffffffffff
Include source files only once |
| User & Date: | elfring on 2003-08-23 14:58:09 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
Multiple inclusion of source files can be avoided in compiled programming languages like C++ by preprocessor statements. ... #if !defined(_my_text_included) #include "my_text.h" #endif ... The TCL function "source" includes files, too. But there are no preprocessor directives in a scripting language like TCL. Their statements get executed every time. The language PHP provides the function "http://de.php.net/manual/en/function.include- once.php". I suggest to add the option "-once" to avoid multiple inclusions of TCL code. ... if {_my_text_included == 0} \ { source "my_text.h" } ... # Write just one line to achieve the same as before with more safety source -once "my_text.h" - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "elfring"
- subsystem changed to: "18. Commands M-Z"
- title changed to: "Include source files only once"
- type changed to: "RFE"