String comparison: Difference between revisions

no edit summary
(Added XPL0 example.)
No edit summary
Line 4,164:
> : true
>= : true
</pre>
 
=={{header|Vlang}}==
<lang go>fn main() {
c := "cat"
d := "dog"
if c == d {
println('$c is bytewise identical to $d')
}
if c != d {
println('$c is bytewise different from $d')
}
if c > d {
println('$c is lexically bytewise greater than $d')
}
if c < d {
println('$c is lexically bytewise less than $d')
}
if c >= d {
println('$c is lexically bytewise greater than or equal to $d')
}
if c <= d {
println('$c is lexically bytewise less than or equal to $d')
}
}</lang>
{{out}}
<pre>
cat is bytewise different from dog
cat is lexically bytewise less than dog
cat is lexically bytewise less than or equal to dog
</pre>
 
338

edits