comparison libinterp/corefcn/interpreter.cc @ 30888:32d2b6604a9f

doc: Ensure documentation lists output argument when it exists for functions in libinterp/ For new users of Octave it is best to show explicit calling forms in the documentation and to show a return argument when it exists. * __ftp__.cc, __magick_read__.cc, __pchip_deriv__.cc, bitfcns.cc, bsxfun.cc, call-stack.cc, cellfun.cc, chol.cc, conv2.cc, data.cc, debug.cc, defaults.cc, det.cc, dirfns.cc, display.cc, dot.cc, error.cc, event-manager.cc, fft.cc, fft2.cc, fftn.cc, file-io.cc, getgrent.cc, getpwent.cc, getrusage.cc, graphics.cc, hash.cc, help.cc, input.cc, interpreter.cc, kron.cc, load-path.cc, mappers.cc, max.cc, nproc.cc, oct-hist.cc, pager.cc, pinv.cc, psi.cc, rand.cc, settings.cc, sighandlers.cc, stream-euler.cc, strfns.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, utils.cc, variables.cc, __fltk_uigetfile__.cc, audiodevinfo.cc, audioread.cc, fftw.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-java.cc, ov-struct.cc, ov-typeinfo.cc, ov-usr-fcn.cc, ov.cc, octave.cc, profiler.cc: Add return arguments to @deftypefn macros where they were missing. Attempt to use standard naming convention for return variables. Occasionally improved the docstring itself by re-wording or adding code examples.
author Rik <rik@octave.org>
date Mon, 04 Apr 2022 10:31:48 -0700
parents d31d4f2504de
children 0ee18536ec5c
comparison
equal deleted inserted replaced
30887:4bab8d3fce79 30888:32d2b6604a9f
234 DEFALIAS (exit, quit); 234 DEFALIAS (exit, quit);
235 235
236 DEFMETHOD (atexit, interp, args, nargout, 236 DEFMETHOD (atexit, interp, args, nargout,
237 doc: /* -*- texinfo -*- 237 doc: /* -*- texinfo -*-
238 @deftypefn {} {} atexit (@var{fcn}) 238 @deftypefn {} {} atexit (@var{fcn})
239 @deftypefnx {} {} atexit (@var{fcn}, @var{flag}) 239 @deftypefnx {} {} atexit (@var{fcn}, true)
240 @deftypefnx {} {} atexit (@var{fcn}, false)
241 @deftypefnx {} {@var{status} =} atexit (@var{fcn}, false)
240 Register a function to be called when Octave exits. 242 Register a function to be called when Octave exits.
241 243
242 For example, 244 For example,
243 245
244 @example 246 @example
265 267
266 @noindent 268 @noindent
267 will remove the function from the list and Octave will not call 269 will remove the function from the list and Octave will not call
268 @code{last_words} when it exits. 270 @code{last_words} when it exits.
269 271
270 Note that @code{atexit} only removes the first occurrence of a function 272 The optional output @var{status} is only available when unregistering a
271 from the list, so if a function was placed in the list multiple times with 273 function. The value is true if the unregistering was succesful and false
274 otherwise.
275
276 Progamming Note: @code{atexit} only removes the first occurrence of a function
277 from the list; if a function was placed in the list multiple times with
272 @code{atexit}, it must also be removed from the list multiple times. 278 @code{atexit}, it must also be removed from the list multiple times.
273 @seealso{quit} 279 @seealso{quit}
274 @end deftypefn */) 280 @end deftypefn */)
275 { 281 {
276 int nargin = args.length (); 282 int nargin = args.length ();
299 return retval; 305 return retval;
300 } 306 }
301 307
302 DEFMETHOD (__traditional__, interp, , , 308 DEFMETHOD (__traditional__, interp, , ,
303 doc: /* -*- texinfo -*- 309 doc: /* -*- texinfo -*-
304 @deftypefn {} {} __traditional__ () 310 @deftypefn {} {@var{tf} =} __traditional__ ()
305 Undocumented internal function. 311 Return true if Octave was invoked with the @env{--traditional} option.
306 @end deftypefn */) 312 @end deftypefn */)
307 { 313 {
308 return ovl (interp.traditional ()); 314 return ovl (interp.traditional ());
309 } 315 }
310 316