
Hi There, Am 21.09.2009 um 05:39 schrieb Joyce Wilson:
The change I would like is to have spaces taken into account in the name sort.
So we would have something like this:
Green, Alice Green, Robert Greenacre, Janet Greenjeans, Mr.
instead of like this:
Greenacre, Janet Green, Alice Greenjeans, Mr. Green, Robert Duhhhh !! If this is true there are some people that ougth to take a course in 101 programming or db design. It takes about 5 minutes to write the code.
IsEntrySmallertThan(X, Y) :- Pos := 0; If (Length(X) < Length (Y)) then MaxPos = Length(X) -1; else MaxPos = Length(Y) - 1; end if While ((IsSmaller := CharSmaller(X[Pos], Y[Pos]) == 0) and Pos != MaxPos ) Pos := Pos +1; end While return IsSmaller; end EntrySmallerThan CharAtSmaller(X, Y) :- If (Cardinal(X) < Cardinal(Y) ) return 1 else If Cardinal(X) > Cardinal(Y) then return -1; else return 0; end if end if end CahrAtSmaller Cardinal(X) :- If (X in set of standard Chars) then return X else return -1; end if end Cardinal Put this ipseudo code what language you want and voila. Cardinal can be made as complex as you want if you needed finer distinctions. regards Keith.