Location: Allentown, PA (Melbourne, FL in the winter)
04-10-2007, 09:47 PM
The attached is the best that you can do as far as I know (other than possibly by enabling Jython scripting). The only compare functions supported for strings are equal and not equal and the only string function is concatination.
Beware the Jabberwock - Beware the Jujub Bird
And SHUN the Frumious Bandersnatch!
Thanks Jim, that is a lot more than I could come up with.
I'm really surprised that the == operator can be used to compare strings. That is such an absolute no-no in Java that I didn't even consider trying it.
In Java if you try to use the == operator to compare two objects (String is an object in Java) the result will only be true if the two objects are actually the same object. If they are different String objects containing exactly the same characters, the result of the comparison will be false.
I'll have to think about this to see what it would take to use == and != operators to accomplish what I want to accomplish.
Location: Allentown, PA (Melbourne, FL in the winter)
Follow-up Question -
04-11-2007, 10:17 AM
Along this vein, does anyone have a reference for which operators in Alice work with which data types and how? This is one area that I’ve only been able to figure out by trial and error – and in some cases, such as a “Transformable” data type, not even then.
Beware the Jabberwock - Beware the Jujub Bird
And SHUN the Frumious Bandersnatch!
Continuing with this vein, can someone provide an example of using the Transformable data type. I used the search button to search for Transformable in the forums and didn't find any links to the word (but maybe I didn't set up the search correctly).