On 12/31/2011 8:51 AM, dpb wrote:
...
> I'd guess you either have another variable stat from an earlier testing
> of the function or by accident or there's a stale copy getting loaded.
...
Whoops! Sent before edit...
A variable stat wouldn't be the same error so my bet is on the stale copy.
And, of course, it is that the old copy may be cached in memory, not
getting loaded that the
clear stat
will resolve
Oh, another thought...
Is there by any chance from earlier edits an internal function in the
calling routine m-file also name stat (maybe from before you decided to
move it to its own m-file to be externally callable) that doesn't have
the argument or has a typo between the argument and the used variable or
somesuch?
That would explain why the function would work from the command line but
not from the particular m-file that called it.
--
--