Skip to content

Support multi-dimensional array comma access syntax #1048

@TwitchBronBron

Description

@TwitchBronBron

Apparently multi-dimensional arrays support using a comma to access sub levels, rather than [idx][idx].
The parser currently fails with this syntax.
image

Here's some examples:

myMultiArray = [["hello"]]

'currently supported syntax
print myMultiArray[0][0]
'currently broken syntax
print myMultiArray[0, 0]

This seems to work for however many levels of nesting you have.

myMultiArray = [[[[[[[[["hello"]]]]]]]]]
print myMultiArray[0][0][0][0][0][0][0][0][0]
print myMultiArray[0, 0, 0, 0, 0, 0, 0, 0, 0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions