Skip to content

Misleading example in "array" reference page #813

@PrismSync

Description

@PrismSync

On the reference page for the datatype "array", an example of initialization was shown as the following:

notice that in line 3, the array was declared to be of 6 elements, yet only 5 elements are present in the { }initialization part. We understand that in reality the last element will be initialized as zero by default, but with the context, I'm afraid this might be understood as that the declared size number of an array should be 1 more than the number of elements (as that for char array)

reference page for array
image

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