Xref: utzoo comp.lang.c:36671 comp.software-eng:4959 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!ox.com!jih From: jih@ox.com (John Hritz) Newsgroups: comp.lang.c,comp.software-eng Subject: Re: Source File Organization Summary: Use of assertions for defensive programming Message-ID: <1991Mar1.205033.6223@ox.com> Date: 1 Mar 91 20:50:33 GMT References: <1991Feb26.045242.23453@rfengr.com> Organization: OTA Limited Partnership Lines: 10 The approach I take when faced with this kind of problem is to place an assert statement in the main() as a check. assert(sizeof(a) == sizeof(b)) will probably do the trick. These statements can be left out of the code by setting a compile switch, usually NDEBUG. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John I. Hritz Photons have mass?! jih@ox.com I didn't know they 313-930-9126 were catholic!