Exemple #1
0
 public For(Var <TIndex> index, Value <TIndex> init, Value <bool> condition, VarAssign <TIndex> incr)
 {
     this.index     = index;
     indexDeclAss   = new VarDeclareAssign <TIndex>(index, init);
     this.condition = condition;
     this.incr      = incr;
 }
Exemple #2
0
        public For <T> For <T>(Value <T> init, Value <T> max, Value <T> incrementBy)
        {
            var index     = new Var <T>("index");
            var condition = new Compare <T>(index, max, CompareType.Less);
            var incr      = new VarAssign <T>(index, index + incrementBy);

            var forLoop = new For <T>(index, init, condition, incr);

            Append(forLoop);

            return(forLoop);
        }
Exemple #3
0
        public void Set <T>(Var <T> var, Value <T> val)
        {
            var ass = new VarAssign <T>(var, val);

            Append(ass);
        }