🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2422

Re: Macros and Braces

#2422
From: Kurt Watzka
Date: Wed, 27 Mar 1996 23:57
20 lines
1140 bytes
100576.1776@compuserve.com (Antony Pace (UK/CH)) writes:

>I wrote:

>>> I am having problems writing a macro (Ansi C) for which I feel there
>must be standard technique.  Can anyone help? <<

>Many thanks to everyone who emailed me the standard technique of the do
>{...} while(1) structure.  This is exactly what I needed.  I didn't
>expect such a generous response and will look out for the FAQ.

I would avoid using "do { ... } while(1)" as a wrapper for "function like
macros". It might lead to unexpected results. :-)

Kurt
--
| Kurt Watzka                             Phone : +49-89-2180-6254
| watzka@stat.uni-muenchen.de
| ua302aa@sunmail.lrz-muenchen.de
Technical Details
Message-ID: <4jcklt$9uj@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: OUI256@USER.COM <4ja3sd$pb9@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: watzka@stat.uni-muenchen.de (Kurt Watzka)
Newsgroups: comp.lang.c.moderated
Subject: Re: Macros and Braces
Date: 27 Mar 1996 17:57:49 -0600
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4jcklt$9uj@solutions.solon.com>
References: OUI256@USER.COM <4ja3sd$pb9@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com