1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-02 05:00:38 +00:00

Properly warns user when a non-_MEM var is used with _MEM functions.

Closes #47
This commit is contained in:
FellippeHeitor 2018-09-30 20:54:59 -03:00
parent bed68767e6
commit f6c068ba19

View file

@ -17525,6 +17525,11 @@ FUNCTION evaluatetotyp$ (a2$, targettyp AS LONG)
Give_Error "Illegal string-number conversion": EXIT FUNCTION
END IF
'_MEM?
IF (sourcetyp AND (ISUDT + (1))) <> (targettyp AND (ISUDT + (1))) THEN
Give_Error "Illegal data type conversion (function returns _MEM type)": EXIT FUNCTION
END IF
IF (sourcetyp AND ISSTRING) THEN
evaluatetotyp$ = e$
IF (sourcetyp AND ISREFERENCE) THEN