From 7b404736c48f1a16df02af0184529c5d94787068 Mon Sep 17 00:00:00 2001 From: SMcNeill Date: Sat, 1 Mar 2014 02:50:19 -0500 Subject: [PATCH] Fix so CONST will work with math functions without erroring out with CONST x=COS(10). --- .../MathEval/Math Evaluator User Variables.bin | Bin 129 -> 129 bytes qb64.bas | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/MathEval/Math Evaluator User Variables.bin b/internal/MathEval/Math Evaluator User Variables.bin index 43072885986972c07cc4db20e4fdbcba29dd967a..aaa839ee7eb1bed1e574d2fcf0dedb06b9c7f9fd 100644 GIT binary patch literal 129 lcmWe)U|`VIvoN+aFgG+c0+MDXrbZ^rKv6?ILm)|W008Tu1W5n@ literal 129 UcmZQ%U|=w01`&FOK$89d09{i6#sB~S diff --git a/qb64.bas b/qb64.bas index 5c3ecfb25..402322b59 100644 --- a/qb64.bas +++ b/qb64.bas @@ -2345,14 +2345,14 @@ DO IF LEFT$(temp1$, 5) <> "ERROR" AND temp$ <> temp1$ THEN 'The math routine should have did its replacement for us. altered = -1 - wholestv$ = LEFT$(wholestv$, l + 1) + temp1$ + MID$(wholestv$, l2 + 1) + wholestv$ = LEFT$(wholestv$, l) + temp1$ + MID$(wholestv$, l2 + 1) ELSE 'We should leave it as it is and let the normal CONST routine handle things from here on out and see if it passes the rest of the error checks. END IF l = l + 1 END IF Emergency_Exit = Emergency_Exit + 1 - IF Emergency_Exit > 10000 THEN a$ = "CONST ERROR: Attempting to process MATH Function caused Endless Loop. Please recheck your math formula." + IF Emergency_Exit > 10000 THEN a$ = "CONST ERROR: Attempting to process MATH Function caused Endless Loop. Please recheck your math formula.": GOTO errmes LOOP UNTIL l = 0 'End of Math Support Edit