Skip to content

MultiMultiply

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Performs mathematical operation of multiplication and formats number when specified.

Parameters

Numbers (multiple) The array of values to add together. Ex: {3}{Variable}{8}

SpecName (constant) The name of the variable for operation result assignment

NumberFormatCode (multiple) The numeric format code (see addendum 1)

ErrorMessage (multiple | optional) The error message to return when any error occurs.

Synopsis

Performs simple mathematical calculation on the array of numbers and returns the result to a defined variable which may be used in other defined actions.

Source Code

public static void MultiMultiple(object Numbers, string SpecName, object NumberFormatCode, object ErrorMessage)
{
	Break();
	try
	{
		double count = 0;
		object[] numbers = ParseArray(Numbers);
		foreach (object n in numbers)
		{
			count *= N(n);
		}
		Variable(SpecName).Value = count.ToString((string)NumberFormatCode);
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally