Exemplo n.º 1
0
        public FunctionValue(SdfInfo sdfInfo, Value[] args)
        {
            this.sdfInfo = sdfInfo;
            // A null or empty args array is equivalent to an array of all NA
            if (args == null || args.Length == 0)
            {
                args = new Value[sdfInfo.arity];
                for (int i = 0; i < args.Length; i++)
                {
                    args[i] = ErrorValue.naError;
                }
            }
            // Requirement: There will be no further writes to the args array
            this.args = args;
            int k = 0;

            for (int i = 0; i < args.Length; i++)
            {
                if (args[i] == ErrorValue.naError)
                {
                    k++;
                }
            }
            this.arity        = k;
            this.mergeAndCall = MakeMergeAndCallMethod();
        }
Exemplo n.º 2
0
 private void ShowBytecode_Click(object sender, EventArgs e)
 {
     if (functionsListBox.SelectedItem != null)
     {
         SdfInfo info = (SdfInfo)functionsListBox.SelectedItem;
         SdfManager.ShowIL(info);
     }
 }
Exemplo n.º 3
0
 private void RefreshInfo()
 {
     if (functionsListBox.SelectedItem != null)
     {
         SdfInfo info = (SdfInfo)functionsListBox.SelectedItem;
         int     minCol = info.outputCell.ca.col, minRow = info.outputCell.ca.row;
         foreach (FullCellAddr cell in info.inputCells)
         {
             minCol = Math.Min(minCol, cell.ca.col);
             minRow = Math.Min(minRow, cell.ca.row);
         }
         gui.ChangeFocus(new FullCellAddr(info.outputCell.sheet, minCol, minRow));
     }
 }