Previous section-----Next section

Specifying Arguments

While arguments can be typed directly into a formula, it is generally more convenient to specify arguments as the contents of a cell or a range of cells. Editing values contained in cells is much easier than editing values embedded in a formula. And, if entered in a cell, Mathematica syntax does not need to be wrapped in quotes.

Specifying range arguments.

Using the last form of the example, you can easily change the upper and lower bound of the random number by changing cells D2 and E2. Also, by typing Real in cell C2 you can change the type of random number returned.

A single column or single row of cells is interpreted as a one-dimensional Mathematica list; if a range has multiple rows and multiple columns, it is returned as a 2D list of lists.

Specifying String Arguments

To specify a string in Mathematica, you can wrap a text argument with the DATA function. The following methods return a list of Mathematica functions that end in Solve.

Specifying string arguments.

Specifying Numeric Data

Mathematica evaluations are performed at the precision of the inputs provided. If you would like the kernel to perform evaluations numerically at floating-point precision, wrap your inputs with the DATA function.

Specifying numeric arguments.

Specifying Subexpressions

Using the EXPR function you can build up multi-function expressions for a single evaluation.

Specifying subexpressions.

Specifying Options

Mathematica functions may have defined options associated with them. To specify an optional argument you can use the RULE worksheet function.

Specifying an option.