🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Interesting compile-time assertion macro

#2453
From: Raymond Chen
Date: Tue, 02 Apr 1996 01:54
11 lines
898 bytes
On 1 Apr 1996 07:19:33 -0600, haertel@ichips.intel.com (Mike Haertel)
wrote:
>Has anyone ever seen this particular hack before?

Not that particular hack, but I've used this one:

#define AssertNow(c) switch (c) case 0: case c:

The trailing semicolon terminates the switch() statement.  (As
written, it's designed to be used inside a function.  Adjusting it to
work outside a function is left as an exercise.)
Technical Details
Message-ID: <4jq1d4$a12@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4jol55$1pi@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: raymondc@microsoft.com (Raymond Chen)
Newsgroups: comp.lang.c.moderated
Subject: Re: Interesting compile-time assertion macro
Date: 1 Apr 1996 19:54:44 -0600
Organization: Microsoft Corporation
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4jq1d4$a12@solutions.solon.com>
References: <4jol55$1pi@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Newsreader: Forte Agent .99e/32.194