コード例 #1
0
ファイル: Symbol.cs プロジェクト: tipfom/calq
        public int CompareTo(Symbol other)
        {
            if (SType == other.SType)
            {
                switch (SType)
                {
                case SymbolType.Real:
                    return(((Real)this).CompareTo((Real)other));

                case SymbolType.Const:
                    return(((Constant)this).CompareTo((Constant)other));

                case SymbolType.Variable:
                    return(((Variable)this).CompareTo((Variable)other));
                }
            }

            return(SType.CompareTo(other.SType));
        }