1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-26 17:10:38 +00:00

Improves handling of _BIT variables ($Debug). Allows setting values.

This commit is contained in:
FellippeHeitor 2021-09-11 23:06:05 -03:00
parent 27c84393ec
commit 3d5f115eba

View file

@ -7103,6 +7103,10 @@ SUB DebugMode
tempVarType$ = "_UNSIGNED _BIT"
END IF
SELECT CASE tempVarType$
CASE "_BIT", "_UNSIGNED _BIT"
value$ = MKL$(VAL(value$))
varSize& = LEN(dummy&)
result$ = STR$(CVL(value$))
CASE "_BYTE", "_UNSIGNED _BYTE", "BYTE", "UNSIGNED BYTE"
value$ = _MK$(_BYTE, VAL(value$))
varSize& = LEN(dummy%%)
@ -7641,14 +7645,14 @@ SUB DebugMode
IF INSTR(tempVarType$, "BIT *") THEN
IF VAL(MID$(tempVarType$, _INSTRREV(tempVarType$, " ") + 1)) > 32 THEN
tempVarType$ = "_INTEGER64"
IF INSTR(tempVarType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED _INTEGER64"
IF INSTR(varType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED _INTEGER64"
ELSE
tempVarType$ = "LONG"
IF INSTR(tempVarType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED LONG"
IF INSTR(varType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED LONG"
END IF
ELSEIF INSTR("@_BIT@BIT@_UNSIGNED _BIT@UNSIGNED BIT@", "@" + tempVarType$ + "@") THEN
tempVarType$ = "LONG"
IF INSTR(tempVarType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED LONG"
IF INSTR(varType$, "UNSIGNED") THEN tempVarType$ = "_UNSIGNED LONG"
END IF
SELECT CASE tempVarType$
CASE "_BYTE", "_UNSIGNED _BYTE", "BYTE", "UNSIGNED BYTE": varSize& = LEN(dummy%%)