summaryrefslogtreecommitdiff
path: root/src/main/SetParams.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-20 22:26:09 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-20 22:26:09 +0000
commit6a9bdcc53491660dff1443904142e3ddf7a5eacf (patch)
tree2fd6a8b3bd4fca53db2cd731ab7b94e07e2efc7e /src/main/SetParams.c
parent5784e5fc433e446acddcc8fe740d838d64678def (diff)
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
Diffstat (limited to 'src/main/SetParams.c')
-rw-r--r--src/main/SetParams.c15
1 files changed, 15 insertions, 0 deletions
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[<number>]", 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. */