|
Hello, Can someone tell me what character to use to precede comments in
a syntax file? Thank You Barbara Lombardo ====================To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
an astrisk (*) works...
be careful though.....in some versions of SPSS, it won't run commands that are ont he line directly below a comment, it thinks they're part of the comment too... so if you did * blah freq var nothing woudl happen.... but * blah freq var works fine -Graham Lombardo, Barbara wrote: > Hello, Can someone tell me what character to use to precede comments in > a syntax file? > > > > Thank You > > > > Barbara Lombardo > > =================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
A comment, whether written with "*" or the name COMMENT, is a command, and it is terminated by the same rules as any other command. Thus a period is typically required.
However, a blank line also serves as a terminator in interactive mode, which is why the second example below works. But this is a general behavior and not specific to comments. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Graham Wright Sent: Friday, November 16, 2007 10:22 AM To: [hidden email] Subject: Re: [SPSSX-L] syntax comments character? an astrisk (*) works... be careful though.....in some versions of SPSS, it won't run commands that are ont he line directly below a comment, it thinks they're part of the comment too... so if you did * blah freq var nothing woudl happen.... but * blah freq var works fine ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Graham Wright-2
You need a period (.) after the * for commands below the * to be read.
Mariajosé Romero, Ph.D. Associate Research Scientist National Center for Children in Poverty Mailman School of Public Health Columbia University 215 W 125th Street, 3rd Floor New York, NY 10027 Direct: 646.284.9641 Fax: 646.284.9623 [hidden email] www.nccp.org www.childcareresearch.org Graham Wright wrote: > an astrisk (*) works... > > be careful though.....in some versions of SPSS, it won't run commands > that are ont he line directly below a comment, it thinks they're part of > the comment too... > > so if you did > > * blah > freq var > > nothing woudl happen.... but > > * blah > > freq var > > > works fine > > > -Graham > > Lombardo, Barbara wrote: > >> Hello, Can someone tell me what character to use to precede comments in >> a syntax file? >> >> >> >> Thank You >> >> >> >> Barbara Lombardo >> >> =================== >> To manage your subscription to SPSSX-L, send a message to >> [hidden email] (not to SPSSX-L), with no body text except the >> command. To leave the list, send the command >> SIGNOFF SPSSX-L >> For a list of commands to manage subscriptions, send the command >> INFO REFCARD >> > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
I actually just forgot the period after the freq command in my last
email, but in my version of spss (15) it doesn't work even if you do put a period in after the command: None of the following work at all *BLAH freq var. *BLAH* freq var. The syntax shows up in the output, but nothing actually happens. This is actually something I've been annoyed about for a while....it is especially aggravating when I have the following: *comment * temporary. select if blah=1. in the middle of some syntax and realize later that I completely eviscerated my dataset by accident, because it omitted the temporary command but ran the select if. Is it just me that this happens to, or do other notice the same thing? -G ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Mariajose Romero
Every comment must start with an asterisk (*) and must finish with
a period mark (.). Example: * This is a comment. Alternatively, the asterisk may be replaced by the word COMMENT. Example: COMMENT This is a comment. Hector ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Graham Wright-2
If you don't like the behavior of * or COMMENT as commands, use the single-line comment form instead:
/* single line comment freq year. "/*" comments always end with the end of line. And they can even be inserted inside commands as in FREQUENCIES VARIABLES=origin /* interspersed comment /STATISTICS=STDDEV MINIMUM MAXIMUM /ORDER=ANALYSIS. From the CSR... Use /* and */ to set off a comment within a command. The comment can be placed wherever a blank is valid (except within strings) and should be preceded by a blank. Comments within a command cannot be continued onto the next line. The closing */ is optional when the comment is at the end of the line. The command can continue onto the next line just as if the inserted comment was a blank -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Graham Wright Sent: Friday, November 16, 2007 10:52 AM To: [hidden email] Subject: Re: [SPSSX-L] syntax comments character? I actually just forgot the period after the freq command in my last email, but in my version of spss (15) it doesn't work even if you do put a period in after the command: None of the following work at all *BLAH freq var. *BLAH* freq var. The syntax shows up in the output, but nothing actually happens. This is actually something I've been annoyed about for a while....it is especially aggravating when I have the following: *comment * temporary. select if blah=1. in the middle of some syntax and realize later that I completely eviscerated my dataset by accident, because it omitted the temporary command but ran the select if. Is it just me that this happens to, or do other notice the same thing? -G ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by Graham Wright-2
Hello Barbara,
The asterisk (*) works, but don't forget that a syntax command starts in the first column of a line, might span multiple lines and ends with a period (.)! If you write in the syntax: --------------- * blah freq var --------------- De interpreter starts with the asterisk en decides that it's a comment so no need to parse the text. It then patiently scans the text for the period. It does'nt find one but after the word 'var' en blanc line occurs, so the interpreter concludes the the command 'Comment' is finished. You can try if the following does function: --------------- * blah . freq var --------------- Regards, Kees de Boer ________________________________ Ing. C.P.J. (Kees) de Boer EMGO, VUmc Datamanagement & Systeembeheer D-451 tel. 020-44 49828 "Geloof: Geloven zonder bewijs in wat iemand die spreekt zonder kennis heeft gezegd over zaken die onvergelijkbaar zijn." Ambrose Bierce -----Oorspronkelijk bericht----- Van: SPSSX(r) Discussion [mailto:[hidden email]]Namens Graham Wright Verzonden: vrijdag 16 november 2007 18:22 Aan: [hidden email] Onderwerp: Re: syntax comments character? an astrisk (*) works... be careful though.....in some versions of SPSS, it won't run commands that are ont he line directly below a comment, it thinks they're part of the comment too... so if you did * blah freq var nothing woudl happen.... but * blah freq var works fine -Graham Lombardo, Barbara wrote: > Hello, Can someone tell me what character to use to precede comments in > a syntax file? > > > > Thank You > > > > Barbara Lombardo > > =================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
