Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!gsbacd.uchicago.edu!gft_robert From: gft_robert@gsbacd.uchicago.edu (opcode ranger) Newsgroups: comp.sys.mac.hypercard Subject: How do HC comparison operators REALLY work? Message-ID: <1991May23.170158.1@gsbacd.uchicago.edu> Date: 23 May 91 23:01:58 GMT Sender: news@midway.uchicago.edu (NewsMistress) Lines: 24 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 = ============================================================================