Skip to content

Tokenising bug v1.11.13 ZXOS_2.09 (integers in expressions inside sprite commands become floats) #72

@NealeTools

Description

@NealeTools

Repro code:

100 SPRITE PRINT 1: SPRITE BORDER %1
9120 FOR %i=%1 TO %3: READ %b[i]: NEXT %i: %c[s]=%12
9122 SPRITE %s,%b[1]<<4+(b[3]=3)-(b[3]=15),%b[2]<<4+(b[3]=1)-(b[3]=13),%63,%b[3],%0,%0,%0: %s=%s+1
9125 PAUSE %0

9260 DATA %3,%4,%1

Run gives nonsense in basic 9122. I have tracked it down to the -(b[3]=13).
If I change "13" for another number, it works fine. If I simply edit and re-enter the line inside NextBASIC (without making any changes, it also fixes itself.

If I change the -(b[3]=13) to -(b[3]=(13)) it still gives nonsense in basic.
If I change the -(b[3]=13) to -(b[3]=(11+2)) it runs fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions