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:
parent
e120c757be
commit
7b404736c4
Binary file not shown.
4
qb64.bas
4
qb64.bas
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue