From ea8234a87595bbc9af6dfc39bbbce0faad25d11b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 16 Nov 2023 22:08:00 -0500 Subject: [PATCH] treat immediate variables like equal style also for evaluating references to computes and fixes --- src/variable.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index 9c0307341a..3bb49218fb 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1499,9 +1499,9 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } } - // equal-style variable is being evaluated + // equal-style or immediate variable is being evaluated - if (style[ivar] == EQUAL) { + if ((style[ivar] == EQUAL) || (ivar < 0)) { // c_ID = scalar from global scalar @@ -1767,9 +1767,9 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } } - // equal-style variable is being evaluated + // equal-style or immediate variable is being evaluated - if (style[ivar] == EQUAL) { + if ((style[ivar] == EQUAL) || (ivar < 0)) { // f_ID = scalar from global scalar