help-octave
[Top][All Lists]
Advanced

[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

Hi,

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 make_int.cc 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
hello.cc and the oregonator.cc code without any problems, but I can't
get make_int.cc 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
octave:1> 

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

Thanks

Henry Leinhos



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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