Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
29
Task/String-comparison/Robotic/string-comparison.robotic
Normal file
29
Task/String-comparison/Robotic/string-comparison.robotic
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
set "$str1" to "annoy"
|
||||
set "$str2" to "annoy"
|
||||
: "loop"
|
||||
if "$str1" === "$str2" then "case_equal"
|
||||
if "$str1" = "$str2" then "equal"
|
||||
if "$str1" > "$str2" then "greater_than"
|
||||
if "$str1" < "$str2" then "less_than"
|
||||
end
|
||||
|
||||
: "case_equal"
|
||||
* "&$str1& is case equal to &$str2&"
|
||||
set "$str2" to "ANNOY"
|
||||
goto "loop"
|
||||
|
||||
: "equal"
|
||||
* "&$str1& is equal to &$str2&"
|
||||
set "$str2" to "allow"
|
||||
wait for 100
|
||||
goto "loop"
|
||||
|
||||
: "greater_than"
|
||||
* "&$str1& is lexicographically greater than &$str2&"
|
||||
set "$str1" to "aardvark"
|
||||
wait for 100
|
||||
goto "loop"
|
||||
|
||||
: "less_than"
|
||||
* "&$str1& is lexicographically less than &$str2&"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue