From 02e7dd571660b12eb79c4a2dc2878ce7ff606364 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 May 2019 14:52:26 -0400 Subject: [PATCH] also allow %e in format variables of suffix --- doc/src/Errors_messages.txt | 4 ++-- src/input.cpp | 2 +- src/input.h | 2 +- src/variable.cpp | 2 +- src/variable.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/Errors_messages.txt b/doc/src/Errors_messages.txt index b930dbce30..ce0356a4e7 100644 --- a/doc/src/Errors_messages.txt +++ b/doc/src/Errors_messages.txt @@ -5830,9 +5830,9 @@ Must have periodic x,y dimensions and non-periodic z dimension to use {Incorrect conversion in format string} :dt -A format style variable was not using either a %f or a %g conversion. +A format style variable was not using either a %f, a %g, or a %e conversion. Or an immediate variable with format suffix was not using either -a %f or a %g conversion in the format suffix. :dd +a %f, a %g or a %e conversion in the format suffix. :dd {Incorrect element names in ADP potential file} :dt diff --git a/src/input.cpp b/src/input.cpp index 029c155ee8..0111cb5738 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -529,7 +529,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag) // quick check for proper format string - if (!utils::strmatch(fmtstr,"%[0-9 ]*\\.[0-9]+[fg]")) + if (!utils::strmatch(fmtstr,"%[0-9 ]*\\.[0-9]+[efgEFG]")) error->all(FLERR,"Incorrect conversion in format string"); snprintf(immediate,256,fmtstr,variable->compute_equal(var)); diff --git a/src/input.h b/src/input.h index d62ab11234..33e83bfb06 100644 --- a/src/input.h +++ b/src/input.h @@ -176,7 +176,7 @@ quote. E: Incorrect conversion in format string An immediate variable with format suffix was not using -either a %f or a %g conversion in the format suffix. +either a %f, a %g, or a %e conversion in the format suffix. E: Input line quote not followed by white-space diff --git a/src/variable.cpp b/src/variable.cpp index 0fe18700ee..fdef9985bf 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -384,7 +384,7 @@ void Variable::set(int narg, char **arg) num[nvar] = 3; which[nvar] = 0; pad[nvar] = 0; - if (!utils::strmatch(arg[2],"%[0-9 ]*\\.[0-9]+[fg]")) + if (!utils::strmatch(arg[2],"%[0-9 ]*\\.[0-9]+[efgEFG]")) error->all(FLERR,"Incorrect conversion in format string"); data[nvar] = new char*[num[nvar]]; copy(2,&arg[2],data[nvar]); diff --git a/src/variable.h b/src/variable.h index a071fdb021..512195bd14 100644 --- a/src/variable.h +++ b/src/variable.h @@ -212,7 +212,7 @@ command. E: Incorrect conversion in format string -A format style variable was not using either a %f or a %g conversion. +A format style variable was not using either a %f, a %g, or a %e conversion. E: Next command must list all universe and uloop variables