|
From: | Paul Kienzle |
Subject: | Re: Re-define for built-in octave functions |
Date: | Mon, 14 Jul 2003 21:34:51 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3) Gecko/20030312 |
Nikolay Angeloff wrote:
Is there a way to redefine a built-in, read-only function? I tried to modify load but got the error: error: can't redefine read-only function `load'
You could do it with the octave-forge function dispatch("load","myload","string"). This would redirect all calls of load with calls to myload when the first argument is a string. You could also add the function builtin('load',...) to call the original if needed. Octave-forge is at http://octave.sf.net. Paul Kienzle address@hidden ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |