[comp.sys.mac.hypercard] How do HC comparison operators REALLY work?

gft_robert@gsbacd.uchicago.edu (opcode ranger) (05/24/91)

I have a question about comparison operators.  I have a list of values
(actually, several items on each line, each a difference value, but that's not
important now :->).  I need to do a binary searcht on this list (again, the
actual comparison is against one of the items on a line, but that's not
important either).  The values are strings of the form "oneNumber dash
anotherNumber", e.g. 1234-5.  If I do a comparison like

	8888888-0 < 9-1
	
it returns TRUE (which is what I want, since the list is sorted on this item).
Obviously the comparison is done on ASCII values.  What I want to know is: how
does HC know that this isn't an arithmetic comparison?  My script works how I
want, but I don't know why.


Robert


-- 
============================================================================
= gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "Good tea.        =
=            		         * all my opinions are *  Nice house."     =
=                                * mine                *  -Worf            =
============================================================================