Let's try something simpler:

This complete program works.

        var a : [1..3][1..3] real;

        a[1..3][1] = -3.0;
        // a[2..3][1] = -3.0;
        a[1..3][2] = 3.0;
        a[1..3][3] = 3.0;
        writeln(a);

Uncomment that comment and it does not.

        var a : [1..3][1..3] real;

        a[1..3][1] = -3.0;
        a[2..3][1] = -3.0;
        a[1..3][2] = 3.0;
        a[1..3][3] = 3.0;
        writeln(a);

failing with

        halt reached - array index out of bounds:

What am I doing that is wrong?  It's just slicing and dicing.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to