本文整理汇总了C#中P6any.Does方法的典型用法代码示例。如果您正苦于以下问题:C# P6any.Does方法的具体用法?C# P6any.Does怎么用?C# P6any.Does使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类P6any
的用法示例。
在下文中一共展示了P6any.Does方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNumber
// Coerce a value to numeric and return the group code
public static P6any GetNumber(Variable v, P6any o, out int rank)
{
if (o.mo.num_rank >= 0) {
rank = o.mo.num_rank;
} else {
if (o.Does(o.mo.setting.RealMO)) {
rank = NR_FLOAT;
o = InvokeMethod("Bridge", v).Fetch();
return o;
}
o = o.mo.mro_Numeric.Get(v).Fetch();
rank = o.mo.num_rank;
if (rank < 0)
throw new NieczaException("Not a valid primitive number " +
o.mo.name);
}
if (rank == NR_FIXINT && o is BoxObject<BigInteger>)
rank = NR_BIGINT;
return o;
}
示例2: GetNumber
// Coerce a value to numeric and return the group code
public static P6any GetNumber(Variable v, P6any o, out int rank)
{
if (o.mo.num_rank >= 0) {
rank = o.mo.num_rank;
} else {
if (o.Does(Kernel.RealMO)) {
rank = NR_FLOAT;
o = Kernel.RunInferior(o.InvokeMethod(Kernel.GetInferiorRoot(), "Bridge", new Variable[] { v }, null)).Fetch();
return o;
}
o = o.mo.mro_Numeric.Get(v).Fetch();
rank = o.mo.num_rank;
if (rank < 0)
throw new NieczaException("Not a valid primitive number " +
o.mo.name);
}
if (rank == NR_FIXINT && o is BoxObject<BigInteger>)
rank = NR_BIGINT;
return o;
}