[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
demo peculiarity
From: |
Dmitri A. Sergatskov |
Subject: |
demo peculiarity |
Date: |
Mon, 4 Jun 2007 12:09:44 -0500 |
I found some peculiar behavior for "demo". I am not sure if this is a bug
or a feature.
Lets say I have two files testx.m that defines function :
function testx(str)
disp(["testx: ", str])
endfunction
One file in the current directory and another one in subdirectory "testdir".
The file in the current directory has a demo code:
%!demo
%! testx("test1")
The file in the subdirectory has a different demo code:
%!demo
%! testx("test2")
octave:> which testx
testx is the user-defined function from the file
/home/dima/octave/testx.m
octave:> type testx
testx is the user-defined function defined from: /home/dima/octave/testx.m
function testx(str)
disp(["testx: ", str])
endfunction
%!demo
%! testx("test1")
(Everyhing looks fine here since "." is ahead of "./testdir" in the path.)
Yet:
octave:> demo testx
testx example 1:
testx("test2")
testx: test2
This is all with octave 2.9.9 from Fedora Core 6.
Any comments?
Sincerely,
Dmitri.
--
- demo peculiarity,
Dmitri A. Sergatskov <=