public override string Output(Runtime.OutputType type) { switch (type) { case FuncCalc.Runtime.OutputType.String: return(this.ToString()); case FuncCalc.Runtime.OutputType.Mathjax: { StringBuilder sb = new StringBuilder(); if (this.Variable != null) { sb.Append(this.Variable.ToString()); sb.Append("="); } sb.Append("\\{"); for (int i = 0; i < this.items.Count; i++) { if (i != 0) { sb.Append(", "); } sb.Append("{"); sb.Append(this.items[i].Output(type)); sb.Append("}"); } sb.Append("\\}"); return(sb.ToString()); } default: throw new NotImplementedException(); } }
public override string Output(Runtime.OutputType type) { if (type == OutputType.String) { return(this.ToString()); } return(base.Output(type)); }
public override string Output(Runtime.OutputType type) { return("π"); }