# HG changeset patch # User jwe # Date 1045170571 0 # Node ID cc3a9c2608bd20076541ac2be5ded3f45de0254d # Parent 05973ead74eb801b5357c2aaef10bf5d7bb3eb45 [project @ 2003-02-13 21:09:31 by jwe] diff -r 05973ead74eb -r cc3a9c2608bd ChangeLog --- a/ChangeLog Thu Feb 13 21:03:04 2003 +0000 +++ b/ChangeLog Thu Feb 13 21:09:31 2003 +0000 @@ -1,3 +1,7 @@ +2003-02-13 Paul Kienzle + + * examples/make_int.cc: Support for ISO standard compilers. + 2003-01-22 Richard Stallman * emacs/octave-mod.el (octave-mode-map): Avoid binding keys that diff -r 05973ead74eb -r cc3a9c2608bd examples/make_int.cc --- a/examples/make_int.cc Thu Feb 13 21:03:04 2003 +0000 +++ b/examples/make_int.cc Thu Feb 13 21:09:31 2003 +0000 @@ -26,7 +26,7 @@ #include -class ostream; +#include #include #include @@ -113,7 +113,7 @@ ComplexMatrix complex_matrix_value (bool = false) const { return ComplexMatrix (1, 1, Complex (scalar)); } - octave_value not (void) const { return octave_value ((double) ! scalar); } + octave_value gnot (void) const { return octave_value ((double) ! scalar); } octave_value uminus (void) const { return new octave_integer (- scalar); } @@ -125,7 +125,7 @@ void decrement (void) { --scalar; } - void print (ostream& os, bool pr_as_read_syntax = false) const; + void print (std::ostream& os, bool pr_as_read_syntax = false) const; private: @@ -137,9 +137,10 @@ }; void -octave_integer::print (ostream& os, bool pr_as_read_syntax) const +octave_integer::print (std::ostream& os, bool pr_as_read_syntax) const { - octave_print_internal (os, scalar, pr_as_read_syntax); + os << scalar; + // octave_print_internal (os, scalar, pr_as_read_syntax); } #ifdef DEFUNOP_OP @@ -153,7 +154,7 @@ return octave_value (new octave_integer (op v.t ## _value ())); \ } -DEFUNOP_OP (not, integer, !) +DEFUNOP_OP (gnot, integer, !) DEFUNOP_OP (uminus, integer, -) DEFUNOP_OP (transpose, integer, /* no-op */) DEFUNOP_OP (hermitian, integer, /* no-op */) @@ -262,11 +263,12 @@ if (! type_loaded) { octave_integer::register_type (); + mlock ("make_int"); - cerr << "installing integer type at type-id = " + octave_stdout << "installing integer type at type-id = " << octave_integer::static_type_id () << "\n"; - INSTALL_UNOP (op_not, octave_integer, not); + INSTALL_UNOP (op_not, octave_integer, gnot); INSTALL_UNOP (op_uminus, octave_integer, uminus); INSTALL_UNOP (op_transpose, octave_integer, transpose); INSTALL_UNOP (op_hermitian, octave_integer, hermitian);