>> In basic I can use SGN to get back -1, 0, +1 if a number is <0, 0, >0. > Well, the cmp() function does this if you compare the number to 0: Neat trick Orri, I'd never have thought of that one :-) Alan G.