Skip to content

[Bug]: Wrong array indexing #956

Open
Open
@boriel

Description

Contact Details

@oskostenko

Compiler version

v1.17.3

What happened?

This code works as expected:

sub PrintArray(array() as ubyte)
    for i = lbound(array, 1) to ubound(array, 1)
        print i; ": "; array(i)
    next i
end sub

sub DoSmth
    dim array(1 to 2) as ubyte => {1, 2}
    PrintArray array
end sub

DoSmth

However, when replacing the for line with:

    for i = 1 to 2: REM this is equivalent
...

the results are wrong.

Error and Warning messages

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

Projects

  • Status

    In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions