// dot_2.ds type vector = array[ 1 .. 10 ] of float; type vector1 = array[ 1 .. 20 ] of float; type vector2 = array[ 1 .. 30 ] of int; function void show( vector X, vector Y ) { int i; i = 1; while (i <= 10) { print( "Show: \t X[", i, "] = ", X[i] ); print( "\t Y[", i, "] = ", Y[i] ); println; i = i + 1; } // no ; should be fine. } function void initialize( ref vector X ) { int i; i = 1; while (i <= 10) { X[ i ] = i; i = i + 1; }; ;;;;; // this should be fine too } function vector provide( vector X ) { int i; vector result; i = 1; while (i <= 10) { result[ i ] = 10 - X[ i ] + 1; i = i + 1; }; return( result ); } function float dot_product( vector x, vector y ) { int i; float result; i = 1; result = 0.0; while (i <= 10) { result = result + x[ i ] * y[ i ]; i = i + 1; }; return( result ); } function void main() { int i; float result; vector x, y; initialize( x ); i = 1; while (i <= 10) { i = i + 1; }; y = provide( x ); println(" The result of the dot_product SHOULD be 220.0" ); result = dot_product( x, y ); println(" The result of the dot_product is ", result ); println(" Again, the result of the dot_product is ", dot_product( x, provide( x ))); println("\n\t--==>> That's all, Folks! "); }