To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Conditional compilation

From Wikipedia, the free encyclopedia

In computer programming, conditional compilation is a compilation technique which results in differring executable programs depending on parameters specified. This technique is commonly used when these differences in the program are needed to run it on different platforms, or with different versions of required libraries or hardware.

Many programming languages support conditional compilation. Typically compiler directives define or "undefine" certain variables; other directives test these variables and modify compilation accordingly. For example, not using an actual language, the compiler may be set to define "Macintosh" and undefine "PC", and the code may contain:

(* System generic code *)
if mac != Null then
    (* macOS specific code *)
else if pc != Null
    (* Windows specific code *)

In C and some languages with a similar syntax, this is done using an '#ifdef' directive.

A similar procedure, using the name "conditional comment", is used by Microsoft Internet Explorer from version 5 to 9 to interpret HTML code. There is also a similar proprietary mechanism for adding conditional comments within JScript, known as conditional compilation.[1]

YouTube Encyclopedic

  • 1/3
    Views:
    1 248
    34 659
    12 843
  • C Programming - 42 - Conditional compilation
  • 36 | Conditional Compilation Macros #if #else #elif #endif in C Video Tutorial
  • 123 | #if | #endif | #elif | #else | C++ Conditional Compilation Macros | CPP Video Tutorials

Transcription

Criticism

When conditional compilation depends on too many variables, it can make the code harder to reason about as the number of possible combinations of configuration increases exponentially.[2][3][4] When conditional compilation is done via a preprocessor that does not guarantee syntactically correct output in the source language, such as the C preprocessor, this may lead to hard-to-debug compilation errors,[5][6][7] which is sometimes called "#ifdef hell."[8][9]

References

  1. ^ "Conditional Compilation". Microsoft Corporation. Archived from the original on 2008-09-06. Retrieved 2011-11-27.
  2. ^ Gazzillo, Paul; Wei, Shiyi (2019-05-27). "Conditional Compilation is Dead, Long Live Conditional Compilation!" (PDF). ICSE-NIER '19: Proceedings of the 41st International Conference on Software Engineering: New Ideas and Emerging Results. 2019 IEEE/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER). Montreal, QC, Canada: IEEE Press. pp. 105–108. doi:10.1109/ICSE-NIER.2019.00035. ISBN 978-1-7281-1758-4. Archived (PDF) from the original on 2022-11-07. Retrieved 2023-01-21.
  3. ^ Meinicke, Jens; Thüm, Thomas; Schröter, Reimar; Benduhn, Fabian; Leich, Thomas; Saake, Gunter (2017). Meinicke, Jens; Thüm, Thomas; Schröter, Reimar; Benduhn, Fabian (eds.). Quality Assurance for Conditional Compilation. Cham: Springer International Publishing. pp. 131–139. doi:10.1007/978-3-319-61443-4_12. ISBN 978-3-319-61443-4. Retrieved 2023-01-21. {{cite book}}: |work= ignored (help)
  4. ^ "compiler - How does conditional compilation impact product quality, security and code complexity?". Software Engineering Stack Exchange. Retrieved 2023-01-21.
  5. ^ Le, Duc; Walkingshaw, Eric; Erwig, Martin (2011-09-18). "#ifdef confirmed harmful: Promoting understandable software variation". 2011 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). pp. 143–150. doi:10.1109/VLHCC.2011.6070391. ISBN 978-1-4577-1246-3.
  6. ^ "conditional compilation - Why should #ifdef be avoided in .c files?". Stack Overflow. Retrieved 2023-01-21.
  7. ^ "c++ - Dos and Don'ts of Conditional Compile". Stack Overflow. Retrieved 2023-01-21.
  8. ^ Preschern, Christopher (2019-07-03). Patterns to escape the #ifdef hell (PDF). Proceedings of the 24th European Conference on Pattern Languages of Programs. EuroPLop '19. New York, NY, USA: Association for Computing Machinery. pp. 1–12. doi:10.1145/3361149.3361151. ISBN 978-1-4503-6206-1. Archived (PDF) from the original on 2022-12-21.
  9. ^ "Living in the #ifdef Hell". www.cqse.eu. 28 October 2015. Archived from the original on 2022-11-28. Retrieved 2023-01-21.
This page was last edited on 4 June 2024, at 23:23
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.