Mercurial > hg > octave-nkf
diff scripts/strings/strcmp.m @ 2311:2b5788792cad
[project @ 1996-07-11 20:18:38 by jwe]
author | jwe |
---|---|
date | Thu, 11 Jul 1996 20:18:38 +0000 |
parents | 5cffc4b8de57 |
children | 5ca126254d15 |
line wrap: on
line diff
--- a/scripts/strings/strcmp.m +++ b/scripts/strings/strcmp.m @@ -17,19 +17,19 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -function status = strcmp (s1, s2) +## usage: strcmp (s1, s2) +## +## Compare two strings. Trailing blanks are significant. +## +## WARNING: Unlike the C function of the same name, this function +## returns 1 for equal and zero for not equal. Why? To be compatible +## with Matlab, of course. +## +## Why doesn't this always return a scalar instead of vector with +## elements corresponding to the rows of the string array? To be +## compatible with Matlab, of course. - ## usage: strcmp (s1, s2) - ## - ## Compare two strings. Trailing blanks are significant. - ## - ## WARNING: Unlike the C function of the same name, this function - ## returns 1 for equal and zero for not equal. Why? To be compatible - ## with Matlab, of course. - ## - ## Why doesn't this always return a scalar instead of vector with - ## elements corresponding to the rows of the string array? To be - ## compatible with Matlab, of course. +function status = strcmp (s1, s2) if (nargin != 2) usage ("strcmp (s, t)");