[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
John W. Eaton
Sun, 10 May 1998 22:39:45 -0500 (CDT)
On 10-May-1998, Jonas Bofjall <address@hidden> wrote:
| I feel a bit stupid here. Can you further explain this behaviour? Why
| doesn't Octave notice that the file has changed until the next usage?
It's a bug that I introduced in 2.0.12. In 2.0.11 and earlier
versions, time stamps on M-files may, depending on the value of
ignore_function_time_stamp, be checked every time the function is
called. In 2.0.12, I tried to change that so that time stamps would
be checked at most once in between prompting for input.
Unfortunately, I chose to implement this feature with time(), and the
resolution of is only 1 second, which is not good enough. I'll be
fixing this for 2.0.13.
| I reread the info pages since I got several hints to do so. Why does
| Octave separate `script' m-files and `function' m-files? Is this only
| to decide whether or not to execute the file as well?
A function file is one that, ignoring comments and other whitespace,
begins with the keyword `function'. Such a file is expected to define
exactly one function and when it is autoloaded, it is also called.
Script files are any other M-files, and may define more than one
| The info pages state that Octave decides if a file is to be reread
| by checking its creation date. Now please don't flame me for not
| seeking my answer in the source, but does it check if the file date
| has *changed* or if its *newer*?
Octave checks to see if the time stamp on the file is newer than the
last time it was read.
| (There's a difference when working
| on several machines with unsynchronized clocks, which could explain
| its behaviour completely.)
Having unsynchronized clocks can cause lots of other trouble. I'd
recommend using xntpd to make sure that the clocks on your systems