122-32000 Parallax Inc, 122-32000 Datasheet - Page 308

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
STRCOMP
Compare two strings for equality.
((PUB ┆ PRI))
Returns:
Explanation
STRCOMP
string.
string at StringAddress2, up to the zero-terminator of each string, and returns
strings are equivalent,
Using STRCOMP
The following example assumes
PUB Main
DAT
The above example has two zero-terminated strings in the
Main method calls
method that displays a string, this example prints “Str1 and Str2 are different” on the display.
Page 308 · Propeller Manual v1.0
STRCOMP
if strcomp(@Str1, @Str2)
else
Str1 byte "Hello World", 0
Str2 byte "Testing.", 0
PrintStr(string("Str1 and Str2 are equal"))
PrintStr(string("Str1 and Str2 are different"))
STRCOMP
StringAddress1
compare.
StringAddress2
compare.
is one of two commands (
TRUE
(StringAddress1, StringAddress2 )
– Spin Language Reference
if both strings are equal,
compares the contents of the string at StringAddress1 to the contents of the
STRCOMP
FALSE
is an expression specifying the starting address of the second string to
is an expression specifying the starting address of the first string to
to compare the contents of each string. Assuming
otherwise. This comparison is case-sensitive.
PrintStr
STRCOMP
FALSE
is a method created elsewhere.
and
otherwise.
STRSIZE
) that retrieve information about a
DAT
block,
Str1
and
PrintStr
TRUE
Str2
if both
. The
is a

Related parts for 122-32000