summaryrefslogtreecommitdiff
path: root/lib/sbin/GridFuncStuff.pl
diff options
context:
space:
mode:
authorrideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-01-23 15:28:29 +0000
committerrideout <rideout@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-01-23 15:28:29 +0000
commit5a9038a478b3a55e1890c75b20ab5ecaecbeeade (patch)
tree24e716b8b0d02bfc91f0563526408711f0b2868d /lib/sbin/GridFuncStuff.pl
parent0be500ed5a0464083d10b9dabf021598b3af5e78 (diff)
Allow square brackets in expression for size of grid arrays. Fixes
Cactus/1365. Fix spelling of 'arithmetic'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3097 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/GridFuncStuff.pl')
-rw-r--r--lib/sbin/GridFuncStuff.pl20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl
index 54bde9b3..e931e21b 100644
--- a/lib/sbin/GridFuncStuff.pl
+++ b/lib/sbin/GridFuncStuff.pl
@@ -1130,9 +1130,9 @@ sub VerifyParameterExpression
my($i,$count,@fields);
# First do some global checks
- if($expression !~ m%^[-+*/a-zA-Z0-9_():]+$%)
+ if($expression !~ m%^[-+*/a-zA-Z0-9_():\[\]]+$%)
{
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' contains invalid characters");
}
@@ -1145,7 +1145,7 @@ sub VerifyParameterExpression
if($count < 0)
{
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' has too many closing parentheses",
"",__LINE__,__FILE__);
}
@@ -1153,7 +1153,7 @@ sub VerifyParameterExpression
if($count > 0)
{
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' has unmatched parentheses",
"",__LINE__,__FILE__);
}
@@ -1161,7 +1161,7 @@ sub VerifyParameterExpression
if($expression =~ m:[-+*/]$:)
{
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' ends with an operator",
"",__LINE__,__FILE__);
@@ -1236,35 +1236,35 @@ sub VerifyParameterExpression
elsif($i =~ m:^\(\)$:)
{
# Empty parenthesis - bad
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' contains empty parentheses",
"",__LINE__,__FILE__);
}
elsif($i =~ m:[-+/*]{2,}:)
{
# Two operators in a row - bad
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' contains two operators in a row",
"",__LINE__,__FILE__);
}
elsif($i =~ m:[-+/*]\):)
{
# Operator followed by closing parenthesis - bad
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' has a missing operand",
"",__LINE__,__FILE__);
}
elsif($i =~ m:\([-+/*]:)
{
# Opening parenthesis followed by operator - bad
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' has a missing operand",
"",__LINE__,__FILE__);
}
else
{
# I've run out of imagination
- &CST_error(0, "Array size in $thornname is an invalid arithmatic expression \n"
+ &CST_error(0, "Array size in $thornname is an invalid arithmetic expression \n"
. " '$expression' contains unrecognised token '$i'",
"",__LINE__,__FILE__);
}