|Subject:||Re: Distinguishing Octave from Matlab|
|Date:||Fri, 15 Feb 2008 15:41:51 +0100|
fre, 15 02 2008 kl. 11:32 +0100, skrev David Bateman:
> In this case yes.. The reason is that "OCTAVE_VERSION" is a builtin in
> recent versions of Octave and was previously a variable, therefore we
> can either check both "var" and "builtin" resulting in the need two
> tests, or as we don't care about the speed of the first call, just check
> all possibilities for the type of OCTAVE_VERSION. This allows this
> function to identify all versions of Octave I know of.. However, the use
> of exist twice will be slower, and a generic exist call is even slower
> as it searches the loadpath for possible functions, thus causing disk
> activity. So its better to use a persistent in this case.
Makes sense -- thanks for explaining.
|[Prev in Thread]||Current Thread||[Next in Thread]|