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

[Pkg-octave-devel] octave2.9: Error on line 45 of /usr/share/octave/2.9.6/m/time/etime.m -> bad use of datenum.m



Package: octave2.9
Version: 2.9.6-2
Severity: normal
Tags: experimental



-- System Information:
Debian Release: testing/unstable
 APT prefers unstable
 APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=en_ZA, LC_CTYPE=en_ZA (charmap=ISO-8859-1)

Versions of packages octave2.9 depends on:
ii atlas3-base [liblapack.so.3] 3.6.0-20 Automatically Tuned Linear Algebra ii fftw3 3.0.1-14 library for computing Fast Fourier
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries
ii  libgcc1                       1:4.1.1-5  GCC support library
ii libgfortran0 4.0.3-1 Runtime library for GNU Fortran ap ii libglpk0 4.10-1 linear programming kit (shared lib ii libhdf5-serial-1.6.5-0 [libhd 1.6.5-1 Hierarchical Data Format 5 (HDF5) ii libncurses5 5.5-1 Shared libraries for terminal hand ii libpcre3 6.4-1.1 Perl 5 Compatible Regular Expressi ii libreadline5 5.1-7 GNU readline and history libraries
ii  libstdc++6                    4.1.1-5    The GNU Standard C++ Library v3
ii libufsparse 1.2-6 collection of libraries for comput ii texinfo 4.8-8 Documentation system for on-line i
ii  zlib1g                        1:1.2.3-11 compression library - runtime

octave2.9 recommends no packages.

-- no debconf information

Given a script such as:
  t = clock()
  etime(clock(), t)

results in the following error message:
  error: element number 2 undefined in return list
  error: evaluating assignment expression near line 45, column 13
error: called from `etime' in file `/usr/share/octave/2.9.6/m/time/etime.m'
  error: near line 2 of file `xxx.m'

Investigating the error message shows that it is generated by the following line of code in etime.m:
  [d1, s1] = datenum (t1);

Further investigating the function datenum(...) with `help datenum', gives the following text:
-- Function File:  datenum(Y, M, D [, h , m [, s]])
-- Function File:  datenum('date' [, P])
    Returns the specified local time as a day number, with Jan 1, 0000
    being day 1. By this reckoning, Jan 1, 1970 is day number 719529.
    The fractional portion, corresponds to the portion of the
    specified day.

datenum(...) does not have two returns! Reverting to the etime.m of 2.1.73 (in the stable tree), in /usr/share/octave/2.1.73/m/miscellaneous/ *seems* to provide a temporary workaround to the problem.

--
Jan Vermeulen
The Extremist
23137216

"God has such a deep reverence for our freedom that he'd much rather have us freely go to Hell, than be compelled to go to Heaven"
                                               ----------Desmond Tutu
                       Beyers Naude Memorial Lecture 2003 (15 August)




Reply to: