@[test(code_01)] vec = [1, 2, 3] io.writeln( vec ) @[test(code_01)] @[test(code_01)] [ 1, 2, 3 ] @[test(code_01)] @[test(code_01)] vec = [1.0; 2; 3] io.writeln( std.about(vec), vec ) @[test(code_01)] @[test(code_01)] {{array}} .* {{[ 1.000000; 2.000000; 3.000000 ]}} @[test(code_01)] @[test(code_01)] mat = [1.0, 2; 3, 4] io.writeln( std.about(mat) ) io.writeln( mat ) @[test(code_01)] @[test(code_01)] {{array}} .* {{row[0,:]: 1.000000 2.000000 row[1,:]: 3.000000 4.000000}} @[test(code_01)] @[test(code_01)] mat = [ [1, 2], [3, 4] ] io.writeln( std.about(mat), mat.dims() ) io.writeln( mat ) @[test(code_01)] @[test(code_01)] {{array}} .* {{row[0,:]: 1 2 row[1,:]: 3 4}} @[test(code_01)] @[test(code_01)] mat = array{ 1, 2; 3, 4 } io.writeln( std.about(mat) ) io.writeln( mat ) @[test(code_01)] @[test(code_01)] {{array}} .* {{row[0,:]: 1 2 row[1,:]: 3 4}} @[test(code_01)] @[test(code_01)] mat = array(2){ [1, 2, 3] } io.writeln( %mat, std.about(mat) ) io.writeln( mat ) @[test(code_01)] @[test(code_01)] {{6 array}} .* {{row[0,:]: 1 2 3 row[1,:]: 1 2 3}} @[test(code_01)] @[test(code_01)] mat = array(2,2,3){ [I,J,K] [I,J,K] } io.writeln( mat ) @[test(code_01)] @[test(code_01)] {{row[0,0,0,:]: 0 0 0 row[0,0,1,:]: 0 0 1 row[0,0,2,:]: 0 0 2 row[0,1,0,:]: 0 1 0 row[0,1,1,:]: 0 1 1 row[0,1,2,:]: 0 1 2 row[1,0,0,:]: 1 0 0 row[1,0,1,:]: 1 0 1 row[1,0,2,:]: 1 0 2 row[1,1,0,:]: 1 1 0 row[1,1,1,:]: 1 1 1 row[1,1,2,:]: 1 1 2}} @[test(code_01)] @[test(code_01)] mat = array(2,3,4){ [I,J,K] [I+1, J+2, K+3] } mat.iterate{ [X,I,J,K] if( (I+J+K) % 5 == 0 ) io.writeln( X, I, J, K ) } @[test(code_01)] @[test(code_01)] {{1 0 0 0 2 0 0 0 3 0 0 0 1 0 2 3 4 0 2 3 6 0 2 3 2 1 1 3 3 1 1 3 6 1 1 3 2 1 2 2 4 1 2 2 5 1 2 2}} @[test(code_01)] @[test(code_01)] [1] / 0 @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1] / 0.0 @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1] / 0.0C @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1] / [0] @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1] / [0.0] @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1] / [0.0C] @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1.0] / 0 @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1.0] / 0.0 @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] [1.0] / 0.0C @[test(code_01)] @[test(code_01)] {{Error::Float::DivByZero}} @[test(code_01)] @[test(code_01)] a = [] b = a[] @[test(code_01)] @[test(code_01)] [ ] @[test(code_01)] @[test(code_01)] a = [1] b = a[:] @[test(code_01)] @[test(code_01)] [ 1 ] @[test(code_01)] @[test(code_01)] a = [1] b = [a] @[test(code_01)] @[test(code_01)] [ 1 ] @[test(code_01)] @[test(code_01)] a = [1] b = [a,a] @[test(code_01)] @[test(code_01)] [ 1, 1 ] @[test(code_01)]