1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 07:41:21 +00:00

Fix so CONST will work with math functions without erroring out with CONST x=COS(10).

This commit is contained in:
SMcNeill 2014-03-01 02:50:19 -05:00
parent e120c757be
commit 7b404736c4
2 changed files with 2 additions and 2 deletions

View file

@ -2345,14 +2345,14 @@ DO
IF LEFT$(temp1$, 5) <> "ERROR" AND temp$ <> temp1$ THEN IF LEFT$(temp1$, 5) <> "ERROR" AND temp$ <> temp1$ THEN
'The math routine should have did its replacement for us. 'The math routine should have did its replacement for us.
altered = -1 altered = -1
wholestv$ = LEFT$(wholestv$, l + 1) + temp1$ + MID$(wholestv$, l2 + 1) wholestv$ = LEFT$(wholestv$, l) + temp1$ + MID$(wholestv$, l2 + 1)
ELSE 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. '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 END IF
l = l + 1 l = l + 1
END IF END IF
Emergency_Exit = Emergency_Exit + 1 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 LOOP UNTIL l = 0
'End of Math Support Edit 'End of Math Support Edit