# HG changeset patch # User Rik # Date 1409597206 25200 # Node ID efd5cf93013b4ff404e065990b6005bc899f7232 # Parent be8a12acb20acf547ac98b7101ebdbcf594a3b94 doc: Move validatestrings into function chapter of manual. * func.txi: Add validatestrings to function chapter dealing with processing function inputs. * strings.txi: Remove validatestrings from strings chapter. * validateattributes.m: Update seealso cross reference list. * validatestring.m: Update seealso cross reference list. diff -r be8a12acb20a -r efd5cf93013b doc/interpreter/func.txi --- a/doc/interpreter/func.txi Mon Sep 01 10:57:29 2014 -0700 +++ b/doc/interpreter/func.txi Mon Sep 01 11:46:46 2014 -0700 @@ -393,8 +393,6 @@ which stops the function execution and prints a message about the correct way to call the function whenever the number of inputs is wrong. -@DOCSTRING(validateattributes) - For compatibility with @sc{matlab}, @code{narginchk} and @code{nargoutchk} are available which provide similar error checking. @@ -402,8 +400,17 @@ @DOCSTRING(nargoutchk) -There is also the class @code{inputParser} which can perform extremely -complex input checking for functions. +Besides the number of arguments, inputs can be checked for various properties. +@code{validatestring} is used for string arguments and +@code{validateattributes} for numeric arguments. + +@DOCSTRING(validatestring) + +@DOCSTRING(validateattributes) + +If none of the preceding functions is sufficient there is also the class +@code{inputParser} which can perform extremely complex input checking for +functions. @DOCSTRING(inputParser) diff -r be8a12acb20a -r efd5cf93013b doc/interpreter/strings.txi --- a/doc/interpreter/strings.txi Mon Sep 01 10:57:29 2014 -0700 +++ b/doc/interpreter/strings.txi Mon Sep 01 11:46:46 2014 -0700 @@ -401,8 +401,6 @@ @DOCSTRING(strncmpi) -@DOCSTRING(validatestring) - @node Manipulating Strings @section Manipulating Strings diff -r be8a12acb20a -r efd5cf93013b scripts/general/validateattributes.m --- a/scripts/general/validateattributes.m Mon Sep 01 10:57:29 2014 -0700 +++ b/scripts/general/validateattributes.m Mon Sep 01 11:46:46 2014 -0700 @@ -161,7 +161,7 @@ ## ## @end table ## -## @seealso{nargin, varargin, isa, validatestring} +## @seealso{isa, validatestring, inputParser} ## @end deftypefn function validateattributes (A, cls, attr, varargin) diff -r be8a12acb20a -r efd5cf93013b scripts/strings/validatestring.m --- a/scripts/strings/validatestring.m Mon Sep 01 10:57:29 2014 -0700 +++ b/scripts/strings/validatestring.m Mon Sep 01 11:46:46 2014 -0700 @@ -53,7 +53,7 @@ ## @end group ## @end smallexample ## -## @seealso{strcmp, strcmpi} +## @seealso{strcmp, strcmpi, validateattributes, inputParser} ## @end deftypefn ## Author: Bill Denney