public override Cell Evaluate(SpoolSpace Memory) { Cell x = this.Evaluate(Memory); Cell y = this.Evaluate(Memory); return(x.IsNull ? y : x); }
public override Cell Evaluate(SpoolSpace Memory) { Cell x = this.Evaluate(Memory); Cell y = this.Evaluate(Memory); return(x == y ? CellValues.Null(x.AFFINITY) : x); }
public SpoolSpace(SpoolSpace Seed) : this() { foreach (KeyValuePair <string, Spool> s in Seed._Spools.Entries) { this._Spools.Allocate(s.Key, s.Value); } }
public Record Initialize(SpoolSpace Memory) { RecordBuilder rb = new RecordBuilder(); foreach (Expression x in this._Values) { rb.Add(x.Initialize(Memory)); } return(rb.ToRecord()); }
public CellArray ToArray(SpoolSpace Memory) { CellArray x = new CellArray(); foreach (Expression sx in this._Values.Values) { x.Append(sx.Evaluate(Memory)); } return(x); }
public override Cell Evaluate(SpoolSpace Memory) { Cell c = this._Children[0].Evaluate(Memory); if (c.Affinity != CellAffinity.EQUATION) { return(c); } return(c.valueEQUATION.Evaluate(Memory)); }
public Record Accumulate(SpoolSpace Memory, Record Work) { RecordBuilder rb = new RecordBuilder(); for (int i = 0; i < this._Values.Count; i++) { rb.Add(this._Values[i].Accumulate(Memory, Work[i])); } return(rb.ToRecord()); }
public override Cell Accumulate(SpoolSpace Memory, Cell Work) { Cell x = this._Children[0].Evaluate(Memory); if (this._Trigger == false) { return(x); } return(Work); }
public override Cell Evaluate(SpoolSpace Memory) { CellArray x = new CellArray(); foreach (Expression z in this._Children) { x.Append(z.Evaluate(Memory)); } return(x); }
public Record ToRecord(SpoolSpace Memory) { RecordBuilder rb = new RecordBuilder(); foreach (Expression sx in this._Values.Values) { rb.Add(sx.Evaluate(Memory)); } return(rb.ToRecord()); }
public override Cell Accumulate(SpoolSpace Memory, Cell Work) { Cell x = this._Children[0].Evaluate(Memory); if (!x.IsNull && x.IsNumeric) { Work++; } return(Work); }
public virtual Table Select(SpoolSpace Memory) { Cell val = this.Evaluate(Memory); if (val.Affinity == CellAffinity.TREF) { return(this._Host.OpenTable(val.valueTREF)); } return(null); }
public override Cell Accumulate(SpoolSpace Memory, Cell Work) { Cell x = this._Children[0].Evaluate(Memory); if (!x.IsNull) { return(CellFunctions.Max(Work, x)); } return(Work); }
public override Cell Evaluate(SpoolSpace Memory) { Cell x = this._Children[0].Evaluate(Memory); Cell Idx = this._Children[1].Evaluate(Memory); if (x.IsNull || Idx.IsNull) { return(CellValues.Null(x.AFFINITY)); } return(x[Idx.valueINT]); }
public virtual void WriteTo(SpoolSpace Memory, RecordWriter Writer) { Cell val = this.Evaluate(Memory); if (val.Affinity == CellAffinity.TREF) { Table t = this._Host.OpenTable(val.valueTREF); using (RecordReader rr = t.OpenReader()) { while (rr.CanAdvance) { Writer.Insert(rr.ReadNext()); } } } }
internal Record ToAggShellRecord(SpoolSpace Memory) { RecordBuilder rb = new RecordBuilder(); foreach (Expression x in this._Values.Values) { if (x.IsAggregate) { rb.Add(x.Initialize(Memory)); } else { rb.Add(x.Evaluate(Memory)); } } return(rb.ToRecord()); }
public override Cell Accumulate(SpoolSpace Memory, Cell Work) { if (!Work.IsArray) { throw new Exception("Expecting an array"); } Cell x = this._Children[0].Evaluate(Memory); Cell w = (this._Children.Count == 2 ? this._Children[1].Evaluate(Memory) : CellValues.OneDOUBLE); if (!x.IsNull && !w.IsNull && x.IsNumeric && w.IsNumeric) { Work[0] += w; Work[1] += x * w; Work[2] += x * x * w; } return(Work); }
public override Cell Evaluate(SpoolSpace Memory) { if (this._Children.Count < 2 || this._Children.Count > 3) { throw new Exception("If requires either two or three arguments"); } if (this._Children.Count == 2) { if (this._Children[0].Evaluate(Memory).valueBOOL) { return(this._Children[1].Evaluate(Memory)); } return(CellValues.Null(this._Children[1].TypeOf() != CellAffinity.VARIANT ? this._Children[1].TypeOf() : CellAffinity.INT)); } if (this._Children[0].Evaluate(Memory).valueBOOL) { return(this._Children[1].Evaluate(Memory)); } return(this._Children[2].Evaluate(Memory)); }
public override Cell Evaluate(SpoolSpace Memory) { return(this._Children[0].Evaluate(Memory) % this._Children[1].Evaluate(Memory)); }
public override Cell Evaluate(SpoolSpace Memory) { //Cell x = this._Children[0].Evaluate(Memory); //Cell y = this._Children[1].Evaluate(Memory); return(this._Children[0].Evaluate(Memory) * this._Children[1].Evaluate(Memory)); }
public override Cell Evaluate(SpoolSpace Memory) { return(CellOperations.CheckDivide(this._Children[0].Evaluate(Memory), this._Children[1].Evaluate(Memory))); }
public override Cell Initialize(SpoolSpace Memory) { Cell x = CellValues.MinBYTE; return(new Cell(new CellArray(new Cell[] { x, x, x, x, x, x }))); }
public override Cell Evaluate(SpoolSpace Memory) { return(this._Children[0].Evaluate(Memory).IsNull ? CellValues.True : CellValues.False); }
public override Cell Evaluate(SpoolSpace Memory) { return(Memory[this._sName].Get(this._vName)); }
public override Cell Evaluate(SpoolSpace Memory) { return(new Cell(this._Children[0])); }
public override Cell Initialize(SpoolSpace Memory) { return(CellValues.MinBOOL); }
public override Cell Accumulate(SpoolSpace Memory, Cell Work) { return(this._Children[0].Evaluate(Memory)); }
public override Cell Initialize(SpoolSpace Memory) { return(CellValues.MaxCSTRING); }
public abstract Table Select(SpoolSpace Memory);
public override Cell Evaluate(SpoolSpace Memory) { throw new Exception(); }