Skip to content

[Bug]: Incorrect LBOUND value and array indexing #1022

@oskostenko

Description

@oskostenko

Contact Details

No response

Compiler version

v1.18.4

What happened?

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

dim array(1 to 2) as ubyte => { 10, 20 }
CheckArray array

The result is:

0 10
1 20
2 0

The expected result is:

1 10
2 20

This worked correctly in version v1.18.0-beta10.

Error and Warning messages

Code of Conduct

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions