CMPVEC - compare one B vector to another.
Alternate Entry Name: CMP.VE
Usage:
B:
ret = cmpvec( first, second, size );
/* C users use strcmp or memcmp */
Where:
- first, second
- are vector pointers to two B vectors of equal length.
- size
- is the size of both vectors, as might be declared in an
"auto" statement. For example, if
"vec" was declared as "autovec[10]",
its size would be 10, even though it actually has 11
words.
- ret
- is zero if both vectors are identical. "ret" is
"+(n+1)" if the first "n" words of
the two vectors match and "first[n]" is smaller
than "second[n]". "ret" is
"-(n+1)" if the first "n" words of
the two vectors match and "first[n]" is greater
than "second[n]".
Description:
CMPVEC compares the contents of two B vectors of equal length.
The comparisons are arithmetic, not logical. The function returns
a zero if the vectors are identical, and otherwise indicates the
first position in which the vectors differ.
Copyright © 1996, Thinkage Ltd.