Naming Variables and Functions

Names for variables and functions that you create must meet the following naming rules.

Note: If you create a variable with the same name as one used for statistical analysis or by the Finance functions, an error condition could occur. When you enter the name of a variable that is already in use in the current problem, the entry is shown in bold.

• Variable names must be in one of the forms xxx or xxx.yyy. The xxx part can have 1 to 16 characters. The yyy part, if used, can have 1 to 15 characters. You cannot start or end the variable name with a period (.).
• Characters can consist of letters, digits, and the underscore character (_). Letters can be U.S. or Greek letters (but not Π or π), accented letters, and international characters.
• Do not use c or n from the symbol palette to construct a variable name such as c1 or n12. These may appear to be letters, but they are treated internally as special symbols.
• You can use uppercase or lowercase letters. The names AB22, Ab22, aB22, and ab22 all refer to the same variable.
• You cannot use a digit as the first character of xxx or yyy.
• When entering a subscript, you can use digits zero through 9, U.S. letters, a through z, Latin and Greek letters (but not π) as subscripts (for example, a2, qa, or h2o). To enter a subscript while typing a variable name, touch and hold , and then slide to select .
• Do not use spaces.
• If you want a variable to be treated as a complex number, use an underscore as the last character of the name.
• CAS: If you want a variable to be treated as a type of unit (such as _m or _ft), use an underscore as the first character of the name. You cannot use any other underscores in the name.
• You cannot use an underscore as the first character of a name.
• You cannot use a pre-assigned variable, function, or command name, such as Ans, min, or tan.
• Library documents and library objects are subject to additional naming restrictions. For more information, see Libraries.