public ElaValue AsString(ElaValue val) { if (val.TypeId > SysConst.MAX_TYP) { var tid = val.TypeId; var sb = new StringBuilder(); var usb = val.Ref as ElaUserType2; var xs = new List <String>(); while (usb != null) { xs.Add(usb.Value2.DirectGetString()); var td = usb.Value1.Ref; if (td.TypeId == tid) { usb = td as ElaUserType2; } else { usb = null; xs.Add(td.ToString()); } } for (var i = xs.Count - 1; i > -1; i--) { sb.Append(xs[i]); } return(new ElaValue(sb.ToString())); } return(new ElaValue(val.AsString())); }
public ElaUnit WriteLine(ElaValue val) { Console.WriteLine(val.AsString()); return(ElaUnit.Instance); }
public ElaUnit WriteLine(ElaValue val) { Console.WriteLine(val.AsString()); return ElaUnit.Instance; }