diff libinterp/octave.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 83f9f8bda883
children 1a0756f7c90a
line wrap: on
line diff
--- a/libinterp/octave.cc	Mon Apr 04 00:20:48 2022 -0400
+++ b/libinterp/octave.cc	Mon Apr 04 10:31:48 2022 -0700
@@ -450,7 +450,7 @@
 
 DEFUN (argv, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} argv ()
+@deftypefn {} {@var{args} =} argv ()
 Return the command line arguments passed to Octave.
 
 For example, if you invoked Octave using the command
@@ -481,9 +481,9 @@
 
 DEFUN (cmdline_options, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} argv ()
-Return a structure containing info about the command line arguments
-passed to Octave.
+@deftypefn {} {@var{opt_struct} =} cmdline_options ()
+Return a structure containing info about the command line arguments passed to
+Octave.
 @end deftypefn */)
 {
   if (args.length () != 0)
@@ -501,13 +501,13 @@
 
 DEFUN (program_invocation_name, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} program_invocation_name ()
+@deftypefn {} {@var{name} =} program_invocation_name ()
 Return the name that was typed at the shell prompt to run Octave.
 
-If executing a script from the command line (e.g., @code{octave foo.m})
-or using an executable Octave script, the program name is set to the
-name of the script.  @xref{Executable Octave Programs}, for an example of
-how to create an executable Octave script.
+If executing a script from the command line (e.g., @code{octave foo.m}) or
+using an executable Octave script, the program name is set to the name of the
+script.  @xref{Executable Octave Programs}, for an example of how to create an
+executable Octave script.
 @seealso{program_name}
 @end deftypefn */)
 {
@@ -524,7 +524,7 @@
 
 DEFUN (program_name, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} program_name ()
+@deftypefn {} {@var{name} =} program_name ()
 Return the last component of the value returned by
 @code{program_invocation_name}.
 @seealso{program_invocation_name}