Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
I think this should be split into two bug reports. Unless you think the scope issue is related to the feval issue?
Confirmed. Changing to the "dev" release since the issue is still present there and it will need to be fixed there first.
It seems that the class name, which amounts to a scope operator, is ignored. I tried this code
classdef test_feval_static_method_with_name_ls methods (Static) function x = ls () x = 1; end end end
and when executing
feval ('test_feval_static_method_with_name_ls.ls')
the actual function that gets executed is from ls.m.
It is perhaps a separate bug report, but I also came across this weird behavior while testing:
classdef test_feval_static_method_with_name_test methods (Static) function x = test () x = 1; end end end
octave:11> test_feval_static_method_with_name_test.test ans = 1.0000e+000 octave:12> feval ('test_feval_static_method_with_name_test.test') error: Invalid call to test. Correct usage is: -- test NAME -- test NAME quiet|normal|verbose -- test ("NAME", "quiet|normal|verbose", FID) -- test ("NAME", "quiet|normal|verbose", FNAME) -- SUCCESS = test (...) -- [N, NMAX, NXFAIL, NBUG, NSKIP, NRTSKIP, NREGRESSION] = test (...) -- [CODE, IDX] = test ("NAME", "grabdemo") -- test ([], "explain", FID) -- test ([], "explain", FNAME) Additional help for built-in functions and operators is available in the online version of the manual. Use the command 'doc <topic>' to search the manual index. Help and information about Octave is also available on the WWW at https://www.octave.org and via the help@octave.org mailing list. stopped in print_usage at line 86 [/usr/local/share/octave/6.4.1/m/help/print_usage.m] 86: error ("Octave:invalid-fun-call",
classdef test_feval_static_method methods (Static) function x = return_one () x = 1; end end end
octave:7> test_feval_static_method.return_one ans = 1.0000e+000 octave:8> feval ('test_feval_static_method.return_one') error: feval: function 'test_feval_static_method.return_one' not found octave:9> eval ('test_feval_static_method.return_one') ans = 1.0000e+000
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9