help-octave
[Top][All Lists]
Advanced

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

Re: Overriding builtins


From: Søren Hauberg
Subject: Re: Overriding builtins
Date: Wed, 24 Jan 2007 11:10:10 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

Jurgen Pletinckx skrev:
Dear all,

I am trying to get an existing Matlab codebase running on
Octave (2.1.73). A first hurdle I face is the incompatibility
between Octave's false (which returns a single boolean) and
Matlabs false (which works like logical(zeros(args)), and can
return multi-dimensional arrays).
Octave 2.9.9+ and earlier releases in the 2.9.x series is matlab compatible. So I'm guessing that the best route for you is to upgrade to the development releases.

Altering the existing scripts would work, obviously. So would patching data.cc. But it seems to me that overriding the built-in function (well, constant, actually) might be the
quickest way.

Is that possible? If so, how do I go about it?
I don't think you can overwrite keywords like "false" as I believe they are part of the language and not just functions (not sure on this, though). So I see two routes for you (others might see other routes)
  1) upgrade to the 2.9.x series, or
2) change your scripts (this can be done in a matlab compatible way by using "zeros(n, 'logical')' instead of "false(n)").

Søren


Thanks,



reply via email to

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