Skip to content

Improper array decl in 15.3 #84

@calin-yakimchuk

Description

@calin-yakimchuk

Section 15.3, in slicer(), array 'a' has wrong syntax, should be: integer[10] a = 1..10;

function to_real_vec(integer[] x) returns real[] {
real[*] rvec = x;
return rvec;
}

function slicer() returns real[*] {
integer a[10] = 1..10;
var vector two_halves = to_real_vec(a[1..5]);
two_halves.append(to_real_vec(a[6..]));
return two_halves;
}

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