本文整理汇总了C#中ElaValue.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ElaValue.ToString方法的具体用法?C# ElaValue.ToString怎么用?C# ElaValue.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElaValue
的用法示例。
在下文中一共展示了ElaValue.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Concatenate
internal override ElaValue Concatenate(ElaValue left, ElaValue right, ExecutionContext ctx)
{
right = right.Ref.Force(right, ctx);
if (right.TypeId != ElaMachine.STR)
{
if (right.TypeId == ElaMachine.CHR)
return new ElaValue(left.DirectGetString() + right.ToString());
NoOverloadBinary(TCF.STRING, right, "concatenate", ctx);
return Default();
}
return new ElaValue(left.DirectGetString() + right.DirectGetString());
}
示例2: Show
internal override string Show(ElaValue value, ExecutionContext ctx)
{
return value.ToString();
}
示例3: Show
internal override string Show(ElaValue value, ExecutionContext ctx)
{
var d = value.DirectGetSingle();
if (Single.IsInfinity(d) || Single.IsNaN(d))
return value.ToString();
else
return value.ToString() + "f";
}
示例4: Show
internal override string Show(ElaValue value, ExecutionContext ctx)
{
var d = value.Ref.AsDouble();
if (Double.IsInfinity(d) || Double.IsNaN(d))
return value.ToString();
else
return value.ToString() + "d";
}
示例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());
}