[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make_int.oct example

From: Henry A. Leinhos
Subject: make_int.oct example
Date: Thu, 02 Sep 1999 14:59:55 -0400


I am relatively new to .oct files and c++, and I was looking at the
examples in the ./examples directory of the source distribution (version
2.0.14) for some guidance. I specifically am looking to implement some
bit-wise operators like Matlab's bitxor().  If anyone has already done
this, *please* let me know!

Otherwise, this is what I've tried:

I figure the example that comes with the source distribution
should be a good start, seeing Octave doesn't seem to have an unsigned
(or even signed) integer type. I can compile (using mkoctfile) the and the code without any problems, but I can't
get to compile/work.  My first pass using mkoctfile results
in a few ambiguity errors related to octave_value( scalar ) calls, which
I got around by casting the argument to octave_value to double (just to
compile). Once I get it to compile, I try (in octave)

octave:1> make_int(1)
installing integer type at type-id = 11
ans = error: octave_base_value::print(): wrong type argument `integer'
error: evaluating index expression near line 1, column 1

Before I go any further, has anyone had any luck with as an
.oct file?


Henry Leinhos

Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]