[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52568] str2func can't create a "lazy" handle

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #52568] str2func can't create a "lazy" handle to function which does not exist when str2func is executed
Date: Tue, 3 Apr 2018 10:11:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #9, bug #52568 (project octave):

What does Matlab actually do with a handle to a nonexistent function?  Is it
possible for the handle to become valid, for example if you cd to a directory
where the named function exists?  Once it is valid, does it stay defined the
same way as a function handle that is valid when it is created?  For example,
what does Matlab do for this:

cd /dir/without/foo.m
fh = @foo  %% no foo.m in current dir or loadpath
fh ()      %% presumably an error
cd /dir/with/foo.m
fh ()      %% calls function defined in /dir/with/foo.m?
cd /dir/without/foo.m
fh ()      %% error or calls previous foo.m?

If the last line is an error, then I guess a function handle to a n initially
non-existent function behaves more or less like an alias?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]