Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!azeemk From: azeemk@microsoft.UUCP (Azeem Kahn) Newsgroups: comp.std.c Subject: #ifdef Keywords: preprocessor, inactive segments Message-ID: <9326@microsoft.UUCP> Date: 5 Dec 89 23:58:01 GMT Organization: Microsoft Corp., Redmond WA Lines: 29 This question deals with the implementation of #ifdef. Consider the following: #define VAR #ifdef VAR ... ... #else /* #endif */ #endif VAR is defined and hence the #else is the inactive segment. Now should the preprocessor match the #else with the first or the second #endif? In other words, does the preprocessor have to look at the lines in the inactive segment for comments, unclosed qoutes etc. OR should it disregard everything in the inactive segment and just keep looking for a matching #endif to satisfy the nesting. I want to know what the standard says about this. I am not interested in what some systems do and others don't. Thanks for any info. -azeem.