public override int CompareTo(Expression R) { NamedAtom RA = R as NamedAtom; if (!ReferenceEquals(RA, null)) { int c = TypeRank.CompareTo(RA.TypeRank); if (c != 0) { return(c); } // Try comparing the first 4 chars of the name. c = cmp.CompareTo(RA.cmp); if (c != 0) { return(c); } // First 4 chars match, need to use the full compare. return(String.Compare(name, RA.name, StringComparison.Ordinal)); } return(base.CompareTo(R)); }
public override int CompareTo(Expression R) { if (R is Atom RA) { return(TypeRank.CompareTo(RA.TypeRank)); } return(base.CompareTo(R)); }
public override int CompareTo(Expression R) { Atom RA = R as Atom; if (!ReferenceEquals(RA, null)) { return(TypeRank.CompareTo(RA.TypeRank)); } return(base.CompareTo(R)); }