Binary strings: Difference between revisions

Content added Content deleted
(add RPL)
m (→‎{{header|RPL}}: formatting)
Line 3,849: Line 3,849:
=={{header|RPL}}==
=={{header|RPL}}==
Strings are a sequence of bytes.
Strings are a sequence of bytes.

String creation - no need for destruction as there is a garbage collection mechanism:
String creation:
"This is a new string" <span style="color:grey">@ String is put at stack level 1</span>
"This is a new string" <span style="color:grey">@ String is put at stack level 1</span>
No need for destruction as there is a garbage collection mechanism.

String assignment:
String assignment:
"This is a string" '<span style="color:green">MYTEXT</span>' STO <span style="color:grey">@ String is transferred from stack level 1 to MYTEXT variable</span>
"This is a string" '<span style="color:green">MYTEXT</span>' STO <span style="color:grey">@ String is transferred from stack level 1 to MYTEXT variable</span>
String comparison: numeric operators can be used for equality or lexicographic order
String comparison: numeric operators can be used for equality or lexicographic order
"This" "That" == <span style="color:grey">@ test equality - return 0 here</span>
"This" "That" == <span style="color:grey">@ test equality - returns 0 here</span>
"This" "That" > <span style="color:grey">@ test order - returns 1 here</span>
"This" "That" > <span style="color:grey">@ test order - returns 1 here</span>
Inclusion can also be tested:
Inclusion can also be tested: