Deutsch   English   Français   Italiano  
<vquv54$3et9f$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: Concatenated if and preprocessor
Date: Thu, 13 Mar 2025 16:55:16 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <vquv54$3et9f$1@dont-email.me>
References: <vquuhg$34o8d$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 13 Mar 2025 16:55:17 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f42f249bde5fd152e2d97dfd52aade64";
	logging-data="3634479"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX180XLGajSijQMA1jwRgI0Rj63cdmFFRpD0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:vFbCz4WQY07XM6/gQ9hOyismOEo=
In-Reply-To: <vquuhg$34o8d$2@dont-email.me>
Content-Language: en-GB
Bytes: 1642

On 13/03/2025 16:44, pozz wrote:
> Consider this code:
> 
> if (cond1) {
> ...
> } else if (cond2) {
> ...
> } else if (cond3) {
> ...
> }
> 
> I want to activate every single if with a macro preprocessor. All the 
> combinations are possible: only the first, only the second, only the 
> third, the first and second... and so on.
> 
> What's the best method to have a clean code that is always compiled 
> without errors?

Could you give a short example of what you would want as the result of 
the pre-processing, just with a couple of conditions?