Binary strings: Difference between revisions
m
→{{header|RPL}}: formatting
(add RPL) |
m (→{{header|RPL}}: formatting) |
||
Line 3,849:
=={{header|RPL}}==
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>
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>
String comparison: numeric operators can be used for equality or lexicographic order
"This" "That" == <span style="color:grey">@ test equality -
"This" "That" > <span style="color:grey">@ test order - returns 1 here</span>
Inclusion can also be tested:
|