File MIES_SweepFormula_Executor.ipf

SFE Sweep formula Executor executes a parsed sweep formula

Functions

wave SFE_ExecuteFormula(string formula, string graph, variable singleResult = defaultValue, variable checkExist = defaultValue, variable useVariables = defaultValue, variable line = defaultValue, variable offset = defaultValue, variable preProcess = defaultValue)

Executes a given formula without changing the current SweepFormula notebook supports by default variable assignments does not support “with” and “and” keywords.

Parameters:
  • formula – formula string to execute

  • graph – name of databrowser window

  • singleResult – [optional, default 0], if set then the first dataSet is retrieved from the waveRef wave and returned, the waveRef wave is disposed

  • checkExist – [optional, default 0], only valid if singleResult=1, if set then the data wave in the single dataSet retrieved must exist

  • useVariables – [optional, default 1], when not set, hint the function that the formula string contains only an expression and no variable definitions

  • line – [optional, default NaN], line number of formula in SF notebook, when set, stores the information for the case of an SFH_ASSERT

  • offset – [optional, default NaN], offset of a formula in SF notebook in characters from the start of the line (x-formulas), when set, stores the information for the case of an SFH_ASSERT

  • preProcess – [optional, default 1], when set to 0 then the formula is not in any way preprocessed and must not contain any variable definitions. Also the current error information for SFH_ASSERT is kept as is. The current variable storage is used. This allows to internally execute a formula where a triggered SFH_ASSERT should result in the marking of the “outer” formula in the current SF notebook.

string SFE_ExecuteVariableAssignments(string graph, string preProcCode, variable allowEmptyCode = defaultValue)

Executes each variable assignment expression and stores the result in the variable storage.

Parameters:
  • graph – SweepBrowser graph

  • preProcCode – preprocessed sweep formula notebook text

  • allowEmptyCode – [optional, default 0] when set then the check for empty formula code is disabled, such that input that contains only variable expressions can be evaluated

static wave SFE_FormulaExecutorStringOrVariable(SF_ExecutionData *exd)
static wave SFE_ConvertNonFiniteElements(WaveText subArray)
static variable SFE_ConvertNonFiniteElementsImpl(string element)
static std::tuple<WAVE, WaveText> SFE_ExecutorCreateOrCheckNumeric(WaveDoubleOrNull out, WaveTextOrNull outT, variable size0, variable size1, variable size2, variable size3)
static std::tuple<WAVE, WaveText> SFE_ExecutorCreateOrCheckTextual(WaveOrNull out, WaveTextOrNull outT, variable size0, variable size1, variable size2, variable size3)
static variable SFE_PlaceSubArrayAt(WaveOrNull out, WaveOrNull subArray, variable index)
static wave SFE_ExeReturn(wave out, variable onTopLevel)
variable SFE_IsStringVariable(string varName)

Variables

static const double SFE_VARIABLE_PREFIX = 36