Undefined Name
HP HP Calculator
Severity: MinorWhat Does This Error Mean?
Undefined Name means you referenced a variable, function, or program name that does not exist in the current directory. The name may be misspelled, the variable may have been deleted, or you are in the wrong directory. Check the name spelling and use VAR to see available variables.
Affected Models
- HP 50g
- HP Prime
- HP 48GX
- HP 48G
Common Causes
- Variable name misspelled
- Variable deleted or never created
- Variable stored in a different directory (HP 48/50 series)
- Program references a variable that needs to be defined first
- Using a CAS variable name in the wrong context
How to Fix It
-
Check the variable name for typos.
Variable names are case-sensitive on some HP models. On the HP 50g, ABC and abc are different variables.
-
Press VAR to see all variables in the current directory.
If the variable is not listed, it either does not exist or is in a different directory. Navigate to the correct directory with HOME and the directory keys.
-
Create the missing variable by storing a value.
Type a value, press STO, then type the variable name. For example: 42 STO X creates variable X with value 42.
-
On HP Prime: check that the variable is defined in the correct app or view.
HP Prime apps have separate variable namespaces. A variable defined in Function app may not be visible in Spreadsheet app.
Frequently Asked Questions
What is the HOME directory on the HP 50g?
HOME is the root directory. All other directories are inside it. Press HOME (left-shift UP) to return to the top level. Variables are only visible in the directory where they were created (and subdirectories).
How do I list all variables on the HP Prime?
Press Vars (Shift-4) to see all user variables. You can also see app-specific variables within each app's Views menu.