Diff of /inst/getfields.m [18c397] .. [824d47]  Maximize  Restore

  Switch to side-by-side view

--- a/inst/getfields.m
+++ b/inst/getfields.m
@@ -15,23 +15,24 @@
 ## this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Built-in Function} {} [@var{v1},...] =
-## getfields (@var{s}, 'k1',...) = [@var{s}.k1,...]
+## @deftypefn {Built-in Function} {[@var{v1}, @dots{}] =} getfields (@var{s}, 'k1', @dots{})
+##
+## It is equivalent to [@var{s}.k1, @dots{}]
 ## Return selected values from a scalar struct. Provides some
 ## compatibility and some flexibility.
+## @seealso{setfields,rmfield,isfield,isstruct,struct}
 ## @end deftypefn
-## @seealso{setfields,rmfield,isfield,isstruct,struct}
 
 function [varargout] = getfields (s, varargin)
 
   if (! all (isfield (s, varargin)))
-    error ("some fields not present");
+    error ("getfields: some fields not present");
   endif
 
   if (all (size (s) <= 1))
     varargout = fields2cell (s, varargin);
   else
-    error ("structure must be scalar or empty");
+    error ("getfields: structure must be scalar or empty");
   endif
 
 endfunction