[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing the way script files are evaluated
From: |
John W. Eaton |
Subject: |
Re: changing the way script files are evaluated |
Date: |
Wed, 16 Apr 2008 15:09:36 -0400 |
On 16-Apr-2008, Jaroslav Hajek wrote:
| If no further problems pop up with 3, it seems like a
| win-all-lose-nothing solution.
OK, it turned out to be a little easier to do this than I originally
thought, so the changes are checked in now. I plan to work on block
comments next.
| It would even work when for scripts
| using temporary function redefinition like this:
|
| % start ...
| y = sin(x); % we want the trigonometric function
|
| % Christian version
| function s = sin(i)
| s = {"lust","gluttony","greed","sloth","wrath","envy","pride"}(i);
| endfunction
|
| % ... work in Christian mode
|
| clear sin
| % back in math again
|
|
| admittedly, it is a terrible practice, but I can still imagine myself using
it.
This should work, but "clear sin" does not seem to be working
properly. Using "clear functions" works, but clearing a function
by name should also work. This looks like a bug in clear.
jwe