12345678910111213141516171819202122232425262728293031323334353637 | nums := [5,6,7,8,9]
found := 7 in nums
say "7 in $nums: $found"
fail unless found
found = 99 in nums
say "99 in $nums: $found"
fail if found
table := {"hello"=5, "goodbye"=0}
found = "hello" in table
say "'hello' in $table: $found"
fail unless found
found = "goodbye" in table
say "'goodbye' in $table: $found"
fail unless found
found = "missing" in table
say "'missing' in $table: $found"
fail if found
string := "hello world"
found = "hello" in string
say "'hello' in '$string': $found"
fail unless found
found = "goodbye" in string
say "'goodbye' in '$string': $found"
fail if found
found = "" in string
say "'' in '$string': $found"
fail unless found
|