Skip to main content

descriptive comments in SPSS syntax file

Once you become accustomed to working with a syntax in SPSS, you may prefer to work with the syntax file rather than the familiar point-and-click method. To help you make sense of your syntax, you may wish to add descriptive comments to the syntax-- these are called "Comments" in SPSS. A Comment is descriptive text that doesn't tell SPSS to do anything. But you have to write such comments in a particular way to differentiate them from SPSS commands. If you don't do this properly, SPSS will interpret your text as a command that it doesn't understand and you'll receive an error code. Here are 3 ways you may write Comments to differentiate them from commands in SPSS:
  1. Comment method- Write the word COMMENT (in caps) at the beginning, write your comment, and end it with a period:
    • COMMENT This is a comment and will not be executed.
  2. Asterisk method-Use an asterisk at the beginning, write your comment, and end with a period: 
    • * This is a comment and will continue to be a comment until the terminating period.
  3. Asterisk slash method- (my preferred method-- as fast as an * alone, but very clear to see) enclose your comments in /*  */: 
    • /* This is a comment and will continue to be a comment until the terminating asterisk-slash */
This tip comes directly from here SPSS for Dummies Cheat Sheet.

Comments

Popular posts from this blog

Sequoia trees

One of my favorite assignments - hugging trees and to give you an idea of one of my favorite trees.

meanwhile, in comparison to the Empire State Building
European Colonial Empires, 1492-2008



In addition, here are two more migration maps from CNHI: