source: CPL/oasis3-mct/branches/OASIS3-MCT_2.0_branch/lib/mct/mpeu/assertmpeu.H @ 4775

Last change on this file since 4775 was 4775, checked in by aclsce, 4 years ago
  • Imported oasis3-mct from Cerfacs svn server (not suppotred anymore).

The version has been extracted from https://oasis3mct.cerfacs.fr/svn/branches/OASIS3-MCT_2.0_branch/oasis3-mct@1818

File size: 1.4 KB
Line 
1!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2!       NASA/GSFC, Data Assimilation Office, Code 910.3, GEOS/DAS      !
3!-----------------------------------------------------------------------
4! CVS assertmpeu.H,v 1.2 2007-08-17 20:44:17 jacob Exp
5! CVS MCT_2_8_0 
6!BOP -------------------------------------------------------------------
7!
8! !MODULE: assertmpeu.H - an #include section of ASSERT() macro for Fortran
9!
10! !DESCRIPTION:
11!
12! !INTERFACE:
13!
14!       #define NDEBUG
15!       #include "assertmpeu.H"
16!       ...
17!               use m_die,only : assert_
18!       ...
19!               ASSERT( <Fortran expression> )
20!               ALWAYS_ASSERT( <Fortran expression> )
21!
22! !BUGS
23!       This macro requires Fortran friendly cpp() for macro processing.
24!
25! !REVISION HISTORY:
26!       17Aug07 - R. Jacob <jacob@mcs.anl.gov> - renamed from assert.H to
27!                 prevent namespace collision with assert.h on Mac
28!       28Aug00 - Jing Guo <guo@dao.gsfc.nasa.gov>
29!               - modified
30!               - added the prolog for a brief documentation
31!       before  - Tom Clune
32!               - Created for MP PSAS
33!EOP ___________________________________________________________________
34
35        ! This implementation allows multi-"#include" in a single file
36
37#ifndef ALWAYS_ASSERT
38
39#define ALWAYS_ASSERT(EX) If (.not. (EX) ) call assert_("EX",__FILE__,__LINE__)
40#endif
41
42
43#ifndef ASSERT
44
45#ifdef NDEBUG
46
47#define ASSERT(EX) ! Skip assertion: EX
48
49#else
50
51#define ASSERT(EX) ALWAYS_ASSERT(EX)
52
53#endif
54
55#endif
Note: See TracBrowser for help on using the repository browser.