Mixed Case Variable Names
Variable names can be defined with any mixture of upper- and lowercase characters, and case is preserved for display purposes.
- Variable names are stored and displayed exactly as
specified on commands that read data or create new variables. For
example,
compute NewVar = 1
creates a new variable that will be displayed as NewVar in the Data Editor and in output from any procedures that display variable names. - Commands that refer to existing variable names are
not case sensitive. For example,
FREQUENCIES VARIABLES = newvar
,FREQUENCIES VARIABLES = NEWVAR
, andFREQUENCIES VARIABLES = NewVar
are all functionally equivalent. - In languages such as Japanese, where some characters exist in both narrow and wide forms, these characters are considered different and are displayed using the form in which they were entered.
- When long variable names need to wrap onto multiple lines in output, attempts are made to break lines at underscores, periods, and changes from lower to upper case.
You can use the RENAME
VARIABLES
command to change the case of any characters
in a variable name.
Example
RENAME VARIABLES (newvariable = NewVariable).
- For the existing variable name specification, case is ignored. Any combination of upper and lower case will work.
- For the new variable name, case will be preserved as entered for display purposes.
For more information, see the RENAME VARIABLES
command.