//---------------------------------------------------------------------- Dump() // public static List <string> DumpCodeblock(Codeblock cb) { var decode = new List <string>(); // If no code then return here if (cb.code.ByteCode == null) { decode.Add("Error: No code"); return(decode); } // Dump instructions to the list DumpCode(cb.code, decode); return(decode); }
//-------------------------------------------------------------------- Execute() // public static double ExecuteCodeblock(Codeblock cb, double[] args) { double result = 0; // Store reference to codeblock codeBlock = cb; // If no code then return here if (cb.code.ByteCode == null) { SetError(Error.NoCode, "Check compile error."); return(0d); } // Execute result = ExecuteCode(cb.code, args); return(result); }