#include "string.hh"
#include "real.hh"
-#include "matrix.hh"
/// Perl -like scalar type.
struct Scalar : public String
urg, these are bit silly; perhaps should make "Print_string" class
(derive from Scalar?)
*/
- Scalar (Vector v) { *this = v.str (); }
- Scalar (Matrix m) { *this = m.str (); }
+ Scalar (Vector const &v);
+ Scalar (Matrix const &m);
/** perl -like string to bool conversion.
*/
#include <stdio.h>
#include "scalar.hh"
#include "rational.hh"
+#include "matrix.hh"
Scalar::Scalar (Rational r)
{
return false;
return true;
}
+
+Scalar::Scalar(Matrix const &m)
+{
+ *this = m.str ();
+}
+
+Scalar::Scalar (Vector const &v)
+{
+ *this = v.str ();
+}