Skip to content

Dimensions? #6

@rebcabin

Description

@rebcabin

I noticed that while dimension is spec'ced as follows

dimension = (expr? start, expr? length)

concrete examples of dimension print out as in the following

(Integer 4 [2 3] [4]) # a ttype for an array of 4-byte ints; 
# [2 3] and [4] are of ASDL type "dimension"

instead of as

(Integer 4 [(IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4[]))] 
           [(IntegerConstant 4 (Integer 4 []))])

This is surprising because 2, 3, and 4 in [2 3] [4] are not exprs.

Is this just shorthand in the printout? Is the long-form acceptable input to ASR processors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions