

Alternatively, you can generate syntax while using the graphical user interface: almost all SPSS procedures accessed through the dropdown menus can generate syntax by clicking the Paste button instead of clicking OK/Run. To open a new Syntax Editor window, click File > New > Syntax.Īfter you've opened a Syntax Editor window, you can start writing your syntax directly in this window. Statements associated with the given procedure SPSS Syntax Color Coding Dark blue/purple Color-Codingīy default, SPSS uses color and bolding to indicate the roles of the words in the syntax. Typically, comments in SPSS syntax are color-coded with the color gray. Hitting the Enter key will create a new, un-commented line. In SPSS syntax, placing an asterisk ( *) or a forward-slash followed by an asterisk ( /*) at the start of a line will turn all text on that line into a comment. Your comments should be clear enough that a reader completely unfamiliar with your work can understand what your program is doing. In general, it is good practice to use brief but descriptive comments in your code. Comments help the reader understand what the program is doing. Comments do not affect how the program functions they exist purely for the humans reading and writing the program. You can use all lower case, all upper case, or a mixture of both when writing syntax.Ī comment is a line of text in a program that is not read by the computer as a command.
