Please enable JavaScript to view this site.

General syntax

Variable and parameter names must not be longer than 13 characters.

If you want to use two words to name a variable, separate with the underscore character, for example Half_Life. Don't use a space, hyphen or period.

Prism does not distinguish between upper and lower case letters in variable, parameter or function names.

Use an asterisk (*) to indicate multiplication. Prism does not always recognize implied multiplication. To multiply A times B, enter “A*B” and not “AB”.

Use a caret (^) to indicate power. For example, "A^B" is A to the B power.

Use parentheses as necessary to show the order of operations. To increase readability, substitute brackets [like this] or braces {like this}. Prism interprets parentheses, brackets, and braces identically. Don't make any assumptions about the order of precedence. Include enough parentheses so there is no ambiguity about how the equation is evaluated.

Use a single equals sign to assign a value to a variable.

You don't need any special punctuation at the end of a statement.

To enter a long line, type a backslash (\) at the end of the first line, then press Return and continue. Prism treats the two lines as one.

To enter a comment, type a semicolon (;) and then the text. Comments can begin anywhere on a line.

You can use many functions, most which are similar to those built-in to Excel.

Be careful not to use the name of a built-in function as a parameter name. For example, since beta is the name of a function, you cannot name a parameter beta.


IF-THEN relationships

Prism allows you to introduce some branching logic through use of the IF function. The syntax is:

IF (conditional expression, value if true, value if false).

You can precede a conditional expression with NOT, and can connect two conditional expressions with AND or OR. Examples of conditional expressions:

(A<B or A<C)
X<=A and X>=B 


Prism's syntax is that of most computer languages: "<>" means not equal to, "<=" means less than or equal to, and ">=" means greater than or equal to.

Here is an example.

Y= If (X<X0, Plateau, Plateau*exp(-K*X)) 


In this example, if X is less than X0, then Y is set equal to Plateau. Otherwise Y is computed as Plateau*exp(-K*X). This approach is useful for segmental regression.

You may also insert a conditional expression anywhere in an equation, apart from an If function. A conditional expression evaluates as 1.0 if true and 0.0 if false. Example:

 Y=(X<4)*1 + (X>=4)*10 


When X is less than 4, this evaluates to 1*1 + 0*10=1. When X is greater than 4, this evaluates to 0*1+1*10=10.


© 1995-2019 GraphPad Software, LLC. All rights reserved.