Mercurial > hg > octave-nkf
diff examples/standalonebuiltin.cc @ 18426:adb7c7e6a4a1 stable
doc: Re-write bits of External Code Interface chapter.
* external.txi: Re-write bits of External Code Interface chapter.
* examples/standalonebuiltin.cc: Place std::endl on same line as text
to make code sample take up less space in the manual.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 23 Jan 2014 22:01:22 -0800 |
parents | 3341d2f1e5db |
children | 446c46af4b42 |
line wrap: on
line diff
--- a/examples/standalonebuiltin.cc +++ b/examples/standalonebuiltin.cc @@ -5,7 +5,6 @@ int main (void) { - int n = 2; Matrix a_matrix = Matrix (n, n); @@ -13,10 +12,8 @@ for (octave_idx_type j = 0; j < n; j++) a_matrix(i,j) = (i + 1) * 10 + (j + 1); - std::cout << "This is a matrix:" - << std::endl - << a_matrix - << std::endl; + std::cout << "This is a matrix:" << std::endl + << a_matrix << std::endl; octave_value_list in; in(0) = a_matrix; @@ -24,10 +21,8 @@ octave_value_list out = Fnorm (in, 1); double norm_of_the_matrix = out(0).double_value (); - std::cout << "This is the norm of the matrix:" - << std::endl - << norm_of_the_matrix - << std::endl; + std::cout << "This is the norm of the matrix:" << std::endl + << norm_of_the_matrix << std::endl; return 0; }