Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
::SHE+ILA:: now has ranges (for example 3_5 means "3 to 5 inclusive"). The picture shows 3 apples, 4 oranges, and 5 bananas. Ranges can be used for validating input, for example X <:: ttyin ("A"_"Z") will accept only alphabetic input. Also a range can be used as an array index, e.g
X <:: "TheCatSat OnTheMat" [4_6]
has the value "Cat". Similarly, X <:: "TheCatSatOnTheMat" [6_4]
has the value "taC", and
X <:: "TheCatSatOnTheMat" [-(6_4)]
has the value "The" (because negative subscripts index from the end of an array). Note that negating a range effectively negates both its elements. Ranges can be compared, for example
3_5 is equal to 3_5, and added, for example 1 + 3_5 is equal to 4_6.