本文整理汇总了C#中ElaValue.GetTypeName方法的典型用法代码示例。如果您正苦于以下问题:C# ElaValue.GetTypeName方法的具体用法?C# ElaValue.GetTypeName怎么用?C# ElaValue.GetTypeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElaValue
的用法示例。
在下文中一共展示了ElaValue.GetTypeName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Quot
internal override ElaValue Quot(ElaValue left, ElaValue right, ExecutionContext ctx)
{
if (right.TypeId != ElaMachine.LNG)
{
if (right.TypeId == ElaMachine.INT)
{
if (right.I4 == 0)
{
ctx.DivideByZero(left);
return Default();
}
return new ElaValue(left.Ref.AsLong() / right.I4);
}
else
{
ctx.NoOverload(left.GetTypeName() + "->" + left.GetTypeName() + "->*", left.GetTypeName() + "->" + right.GetTypeName() + "->*", "quot");
return Default();
}
}
var r = right.Ref.AsLong();
if (r == 0)
{
ctx.DivideByZero(left);
return Default();
}
return new ElaValue(left.Ref.AsLong() / right.Ref.AsLong());
}
示例2: NoOperator
public void NoOperator(ElaValue value, string op)
{
Fail(ElaRuntimeError.InvalidOp, value.GetTypeName(), op);
}
示例3: InvalidIndexType
public void InvalidIndexType(ElaValue index)
{
Fail(ElaRuntimeError.InvalidIndexType, index.GetTypeName());
}
示例4: InvalidType
public void InvalidType(string expected, ElaValue given)
{
Fail(ElaRuntimeError.InvalidType, expected, given.GetTypeName());
}
示例5: InvalidFormat
public void InvalidFormat(string format, ElaValue value)
{
Fail(ElaRuntimeError.InvalidFormat, format, value.ToString(), value.GetTypeName());
}
示例6: IndexOutOfRange
public void IndexOutOfRange(ElaValue index, ElaValue obj)
{
Fail(ElaRuntimeError.IndexOutOfRange, index.ToString(), index.GetTypeName(),
obj.ToString(), obj.GetTypeName());
}
示例7: DivideByZero
public void DivideByZero(ElaValue value)
{
Fail(ElaRuntimeError.DivideByZero, value.ToString(), value.GetTypeName());
}
示例8: UnknownField
public void UnknownField(string field, ElaValue given)
{
Fail(ElaRuntimeError.UnknownField, field, given.ToString(), given.GetTypeName());
}
示例9: NotAlgebraicType
public void NotAlgebraicType(ElaValue val)
{
Fail(ElaRuntimeError.NotAlgebraicType, val.GetTypeName());
}