From 6a9bdcc53491660dff1443904142e3ddf7a5eacf Mon Sep 17 00:00:00 2001 From: goodale Date: Mon, 20 May 2002 22:26:09 +0000 Subject: Give error message if tried to set an array parameter without the [number]. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2836 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/main/SetParams.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/SetParams.c') diff --git a/src/main/SetParams.c b/src/main/SetParams.c index 7d4a9e42..7e722194 100644 --- a/src/main/SetParams.c +++ b/src/main/SetParams.c @@ -175,6 +175,21 @@ int CCTKi_SetParameter (const char *parameter, const char *value, int lineno) num_1errors++; } } + else if (retval == -8) + { + /* Tried to set an array base parameter */ + CCTK_VWarn (1, __LINE__, __FILE__, "Cactus", + "In parameter file '%s' line %d: Parameter '%s' is an " + "array base parameter; please use %s[]", parfile, lineno, parameter, parameter); + if (parameter_check == CCTK_PARAMETER_STRICT) + { + num_0errors++; + } + else if (parameter_check == CCTK_PARAMETER_NORMAL) + { + num_1errors++; + } + } else if (retval == -9) { /* Parameter adds to an accumulator and that value would be out of range. */ -- cgit v1.2.3