[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading functions
From: |
Dirk Eddelbuettel |
Subject: |
Re: Loading functions |
Date: |
Fri, 8 May 1998 10:53:28 -0400 (EDT) |
Jonas> How does Octave keep track of when functions (m-files) needs to be
Jonas> reloaded from disk? Sometimes when I edit the file during an Octave
Jonas> session, Octave keeps using the old function as it was when first
Jonas> used. Is there a way to force the m-file to be read (I dislike
Jonas> quitting Octave when I have a lot of data in memory)?
Well, which version of Octave are you using ? The respective code had a few
changes lately, For what it's worth, it works in 2.0.12. In Emacs, I just
wrote foo.m as
function foo ()
disp("Foo");
endfunction
then started Octave, executed foo, changed the text in foo.m to show "Bar"
and hit '<cursor-up> <return>'. As you see, command 2 still showed Foo
whereas for the next one, Octave become aware of the updated file and
displays Bar:
address@hidden:~> octave
Octave, version 2.0.12 (i386-pc-linux-gnu).
Copyright (C) 1996, 1997, 1998 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.
octave:1> foo
Foo
octave:2> foo
Foo <--- not yet updated
octave:3> foo
Bar <--- now it's updated
Hope this helps, Dirk
--
mailto:address@hidden According to the latest official figures,
http://rosebud.ml.org/~edd 43% of all statistics are totally worthless.