Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

condition out

You are here: irt.org | FOLDOC | condition out

<programming> A programming technique that prevents a section of code from being executed by putting it in an if statement whose condition is always false.

It is often easier to do this than to comment out the code because you don't need to modify the code itself (as you would if commenting out each line individually) or worry about nested comments within the code (as you would if putting nesting comment delimiters around it).

For example, in Perl you could write:

 if (0) {
 ...code to be ignored...

In a compiled language, the compiler could simply generate no code for the whole if statement. Some compiled languages such as C provide compile-time directives that achieve the same effect, e.g.:

 #if 0
 ...code to be ignored...

(or "#ifdef notdef").

[Jargon File]


Nearby terms: Concurrent SP/k « Concurrent Versions System « condela « condition out » condom » Conference On DAta SYstems Languages » Conferencing over IP

FOLDOC, Topics, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ?, ALL

©2018 Martin Webb