mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-03 10:01:21 +00:00
Prevent errors with literal string Consts
This commit is contained in:
parent
5e05664896
commit
9d08c78dfc
|
@ -2119,13 +2119,16 @@ DO
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
'intercept current expression and pass it through Evaluate_Expression$
|
'intercept current expression and pass it through Evaluate_Expression$
|
||||||
temp1$ = _TRIM$(Evaluate_Expression$(readable_e$))
|
'(unless it is a literal string)
|
||||||
IF LEFT$(temp1$, 5) <> "ERROR" AND e$ <> temp1$ THEN
|
IF LEFT$(readable_e$, 1) <> CHR$(34) THEN
|
||||||
e$ = lineformat(temp1$) 'retrieve parseable format
|
temp1$ = _TRIM$(Evaluate_Expression$(readable_e$))
|
||||||
ELSE
|
IF LEFT$(temp1$, 5) <> "ERROR" AND e$ <> temp1$ THEN
|
||||||
IF temp1$ = "ERROR - Division By Zero" THEN a$ = temp1$: GOTO errmes
|
e$ = lineformat(temp1$) 'retrieve parseable format
|
||||||
IF INSTR(temp1$, "Improper operations") THEN
|
ELSE
|
||||||
a$ = "Invalid CONST expression.14": GOTO errmes
|
IF temp1$ = "ERROR - Division By Zero" THEN a$ = temp1$: GOTO errmes
|
||||||
|
IF INSTR(temp1$, "Improper operations") THEN
|
||||||
|
a$ = "Invalid CONST expression.14": GOTO errmes
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue