no "continue" in bp 7 commands
[rrq/rrqforth.git] / adoc / p_strncmp.adoc
1 // wordlists.asm:       WORD p_strncmp,'STRNCMP',fasm
2
3 anchor:p_strncmp[]
4
5 === Word: STRNCMP
6 ....
7 Data stack: ( s1 s2 n -- v )
8 ....
9
10 "STRNCMP" is a function words that compares up to n characters of
11 character sequences s1 and s2, and returns the difference of the first
12 differing characters, as in +s2[i] - s1[i]+, or 0 if all n characters
13 are the same.
14
15 I.e., the value v is less than 0 if string [n:s1] is alpha-numerically
16 less than [n:s2],
17 v is greater than 0 if [n:s1] is greater than [n:s2],
18 and v is 0 if [n:s1] and [n:s2] are equal.