From 9129c81edd525d184c402ef35f8ad5ebabe16ed4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 12 May 2008 13:24:33 -0500 Subject: Add IfThen pseudo-function, which expands to ?: in C. --- Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h') diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index 6e9ec8c..cef5d7e 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -7,10 +7,12 @@ #define Abs(x) (fabs(x)) #define Min(x, y) (fmin((x), (y))) #define Max(x, y) (fmax((x), (y))) +#define IfThen(x,y,z) ((x) ? (y) : (z)) #else #define Abs(x) (abs(x)) #define Min(x, y) (min((x), (y))) #define Max(x, y) (max((x), (y))) +/* IfThen cannot be expressed in Fortran */ #endif #define Exp(x) (exp(x)) -- cgit v1.2.3