help-octave
[Top][All Lists]
Advanced

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

Re: Using quad() for multidimensional integrals


From: Glenn Geers
Subject: Re: Using quad() for multidimensional integrals
Date: Fri, 18 Aug 95 9:01:17 EST

Hi,
        octave does support recursion in m-files. I think that the issue here
is whether the functions in libcruft.a do. If you are using f2c to compile
libcruft (the default on most platforms) then the default f2c options do
not make local variables 'automatic' but 'static'. For non C programmer
types this means that on each instantation of the called function you get
the previous values of the local variables (this avoids having to use a
'SAVE' statement in Fortran code) not new ones for each stack frame.

The solution is easy (and it does work). Just add the '-a' option to f2c.
This forces all local variables to be of type 'auto'.

Cheers,
        Glenn

-- 
  Glenn Geers                                 ,-_|\    address@hidden
  CSIRO Division of Radiophysics             /CSIRO\   +61 2 372 4116
  PO Box 76, Epping, NSW 2121                \_,-._/
  AUSTRALIA                                       v    




reply via email to

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