Syntax rules for COMMENT in v22 FM

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax rules for COMMENT in v22 FM

Bruce Weaver
Administrator
As many group members probably know, a blank line after a comment serves as a comment terminator.  (Examples of this have been posted in previous threads on comments, and I include a small example at the bottom of this post.)  But as far as I can see, this is not documented in the FM.  Here's what I find in the v22 FM, under Syntax Rules for COMMENT:

- The first line of a comment can begin with the keyword COMMENT or with an asterisk (*). Comment text
can extend for multiple lines and can contain any characters. A period is required at the end of the last
line to terminate the comment.

- 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.

- Comments cannot be inserted within data lines.

- A comment on a separate line by itself within a command will cause an error. The comment line will
be interpreted as a blank line, which is interpreted as a command terminator.

The first bullet point above says a period is "required" on the last comment line.  But clearly, that is not so:  Inserting a blank line will also terminate the comment.  Is there some reason for not documenting this behavior in the FM?  

By the way, not only did I look at the Syntax Rules for COMMENT, but I also did searches on "blank line" and "empty line", and both came up empty.  

Thanks,
Bruce


* Example of ending a comment with a blank line.

DATA LIST free / junk.
BEGIN DATA
1 2 3
END DATA.

* This is a multi-line comment
  with a period as a terminator.
DESCRIPTIVES junk.

* This is a multi-line comment
  without a period as a terminator
  and with no blank line before the next command
DESCRIPTIVES junk.

* This is a multi-line comment
  without a period as a terminator
  but with no blank line before the next command

DESCRIPTIVES junk.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Rick Oliver-3
http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita

"In the absence of a period as the command terminator, a blank line is interpreted as a command terminator."

This is a global rule for any command.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        04/01/2015 04:27 PM
Subject:        Syntax rules for COMMENT in v22 FM
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




As many group members probably know, a blank line after a comment serves as a
comment terminator.  (Examples of this have been posted in previous threads
on comments, and I include a small example at the bottom of this post.)  But
as far as I can see, this is not documented in the FM.  Here's what I find
in the v22 FM, under Syntax Rules for COMMENT:

- The first line of a comment can begin with the keyword COMMENT or with an
asterisk (*). Comment text
can extend for multiple lines and can contain any characters. A period is
required at the end of the last
line to terminate the comment.

- 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.

- Comments cannot be inserted within data lines.

- A comment on a separate line by itself within a command will cause an
error. The comment line will
be interpreted as a blank line, which is interpreted as a command
terminator.

The first bullet point above says a period is "required" on the last comment
line.  But clearly, that is not so:  Inserting a blank line will also
terminate the comment.  Is there some reason for not documenting this
behavior in the FM?  

By the way, not only did I look at the Syntax Rules for COMMENT, but I also
did searches on "blank line" and "empty line", and both came up empty.  

Thanks,
Bruce


* Example of ending a comment with a blank line.

DATA LIST free / junk.
BEGIN DATA
1 2 3
END DATA.

* This is a multi-line comment
 with a period as a terminator.
DESCRIPTIVES junk.

* This is a multi-line comment
 without a period as a terminator
 and with no blank line before the next command
DESCRIPTIVES junk.

* This is a multi-line comment
 without a period as a terminator
 but with no blank line before the next command

DESCRIPTIVES junk.




-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Mike
In reply to this post by Bruce Weaver
Bruce, actually, what you say below does come as a surprise to me,
that is, a blank line after a comment serves as a comment terminator.

I've checked various SPSS manuals that I have for COMMENT and
this is what I found:

(1) SPSS Version 4.00: there is no explicit mention of a how to
terminate a comment but the example provided uses a period.

(2) SPSS Ver 15: I quote from the PDF manual.

|The first line of a comment can begin with the keyword COMMENT
|or with an asterisk (*). Comment text can extend for multiple lines
|and can contain any characters. A period is required at the end of
the last line to terminate the comment.

I could be having false memories but I remember a number of times
during the 1990s that the absence of a period at the end of comment
caused to include the next procedure even with a blank line in between.

(3) SPSS ver 16: same as ver 15

(4) SPSS ver 18: same as ver 15

So, I assume that some time after ver 18 the "blank line option" was
implemented as an undocumented feature.  Someone from the
SPSS group know if this was a feature all along or is a recent feature
that no one has gotten around to documenting?

-Mike Palij
New York University
[hidden email]


----- Original Message -----
From: "Bruce Weaver" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 01, 2015 5:27 PM
Subject: Syntax rules for COMMENT in v22 FM


> As many group members probably know, a blank line after a comment
> serves as a
> comment terminator.  (Examples of this have been posted in previous
> threads
> on comments, and I include a small example at the bottom of this
> post.)  But
> as far as I can see, this is not documented in the FM.  Here's what I
> find
> in the v22 FM, under Syntax Rules for COMMENT:
>
> - The first line of a comment can begin with the keyword COMMENT or
> with an
> asterisk (*). Comment text
> can extend for multiple lines and can contain any characters. A period
> is
> required at the end of the last
> line to terminate the comment.
>
> - 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.
>
> - Comments cannot be inserted within data lines.
>
> - A comment on a separate line by itself within a command will cause
> an
> error. The comment line will
> be interpreted as a blank line, which is interpreted as a command
> terminator.
>
> The first bullet point above says a period is "required" on the last
> comment
> line.  But clearly, that is not so:  Inserting a blank line will also
> terminate the comment.  Is there some reason for not documenting this
> behavior in the FM?
>
> By the way, not only did I look at the Syntax Rules for COMMENT, but I
> also
> did searches on "blank line" and "empty line", and both came up empty.
>
> Thanks,
> Bruce
>
>
> * Example of ending a comment with a blank line.
>
> DATA LIST free / junk.
> BEGIN DATA
> 1 2 3
> END DATA.
>
> * This is a multi-line comment
>  with a period as a terminator.
> DESCRIPTIVES junk.
>
> * This is a multi-line comment
>  without a period as a terminator
>  and with no blank line before the next command
> DESCRIPTIVES junk.
>
> * This is a multi-line comment
>  without a period as a terminator
>  but with no blank line before the next command
>
> DESCRIPTIVES junk.
>
>
>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
>
> "When all else fails, RTFM."
>
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Mike
In reply to this post by Rick Oliver-3
I don't know where you get the quote below because this is what is
provided when I searched for COMMENT:
 

Overview (COMMENT command)

COMMENT inserts explanatory text within the command sequence. Comments are included among the commands printed back in the output; they do not become part of the information saved in a data file. To include commentary in the dictionary of a data file, use the DOCUMENT command.

Syntax Rules

  • The first line of a comment can begin with the keyword COMMENT or with an asterisk (*). Comment text can extend for multiple lines and can contain any characters. A period is required at the end of the last line to terminate the comment.
 
No change from SPSS manuals from ver 15-18.  So, where is your quote
found and when was it implemented (did they do away with the "History"
section that used to identify what changed were made and when?)?
 
-Mike Palij
New York University
 
 
 
 
----- Original Message -----
Sent: Wednesday, April 01, 2015 5:32 PM
Subject: Re: Syntax rules for COMMENT in v22 FM

http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita

"In the absence of a period as the command terminator, a blank line is interpreted as a command terminator."

This is a global rule for any command.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        04/01/2015 04:27 PM
Subject:        Syntax rules for COMMENT in v22 FM
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




As many group members probably know, a blank line after a comment serves as a
comment terminator.  (Examples of this have been posted in previous threads
on comments, and I include a small example at the bottom of this post.)  But
as far as I can see, this is not documented in the FM.  Here's what I find
in the v22 FM, under Syntax Rules for COMMENT:

- The first line of a comment can begin with the keyword COMMENT or with an
asterisk (*). Comment text
can extend for multiple lines and can contain any characters. A period is
required at the end of the last
line to terminate the comment.

- 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.

- Comments cannot be inserted within data lines.

- A comment on a separate line by itself within a command will cause an
error. The comment line will
be interpreted as a blank line, which is interpreted as a command
terminator.

The first bullet point above says a period is "required" on the last comment
line.  But clearly, that is not so:  Inserting a blank line will also
terminate the comment.  Is there some reason for not documenting this
behavior in the FM?  

By the way, not only did I look at the Syntax Rules for COMMENT, but I also
did searches on "blank line" and "empty line", and both came up empty.  

Thanks,
Bruce


* Example of ending a comment with a blank line.

DATA LIST free / junk.
BEGIN DATA
1 2 3
END DATA.

* This is a multi-line comment
 with a period as a terminator.
DESCRIPTIVES junk.

* This is a multi-line comment
 without a period as a terminator
 and with no blank line before the next command
DESCRIPTIVES junk.

* This is a multi-line comment
 without a period as a terminator
 but with no blank line before the next command

DESCRIPTIVES junk.




-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Bruce Weaver
Administrator
In reply to this post by Rick Oliver-3
Ah, okay.  Thanks Rick.  I now see why I failed to find this when I searched the PDF of the FM for "blank line" -- I included the quotes in the search term.  When I remove them, I find the sentence you quote below.  (It's one of those things that's obvious in hindsight.)  ;-)

Cheers,
Bruce


Rick Oliver wrote
http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita

"In the absence of a period as the command terminator, a blank line is
interpreted as a command terminator."

This is a global rule for any command.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]



From:   Bruce Weaver <[hidden email]>
To:     [hidden email]
Date:   04/01/2015 04:27 PM
Subject:        Syntax rules for COMMENT in v22 FM
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



As many group members probably know, a blank line after a comment serves
as a
comment terminator.  (Examples of this have been posted in previous
threads
on comments, and I include a small example at the bottom of this post.)
But
as far as I can see, this is not documented in the FM.  Here's what I find
in the v22 FM, under Syntax Rules for COMMENT:

- The first line of a comment can begin with the keyword COMMENT or with
an
asterisk (*). Comment text
can extend for multiple lines and can contain any characters. A period is
required at the end of the last
line to terminate the comment.

- 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.

- Comments cannot be inserted within data lines.

- A comment on a separate line by itself within a command will cause an
error. The comment line will
be interpreted as a blank line, which is interpreted as a command
terminator.

The first bullet point above says a period is "required" on the last
comment
line.  But clearly, that is not so:  Inserting a blank line will also
terminate the comment.  Is there some reason for not documenting this
behavior in the FM?

By the way, not only did I look at the Syntax Rules for COMMENT, but I
also
did searches on "blank line" and "empty line", and both came up empty.

Thanks,
Bruce


* Example of ending a comment with a blank line.

DATA LIST free / junk.
BEGIN DATA
1 2 3
END DATA.

* This is a multi-line comment
  with a period as a terminator.
DESCRIPTIVES junk.

* This is a multi-line comment
  without a period as a terminator
  and with no blank line before the next command
DESCRIPTIVES junk.

* This is a multi-line comment
  without a period as a terminator
  but with no blank line before the next command

DESCRIPTIVES junk.




-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html

Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Bruce Weaver
Administrator
In reply to this post by Mike
Mike, in the PDF of the Command Syntax Reference manual, look up Universals > Commands > Running Commands, and see the 4th bullet point under "Interactive Mode".  Copying & pasting from there:

"In the absence of a period as the command terminator, a blank line is interpreted as a command
terminator."



Mike Palij wrote
I don't know where you get the quote below because this is what is
provided when I searched for COMMENT:

Overview (COMMENT command)
COMMENT inserts explanatory text within the command sequence. Comments are included among the commands printed back in the output; they do not become part of the information saved in a data file. To include commentary in the dictionary of a data file, use the DOCUMENT command.

Syntax Rules

  a.. The first line of a comment can begin with the keyword COMMENT or with an asterisk (*). Comment text can extend for multiple lines and can contain any characters. A period is required at the end of the last line to terminate the comment.

No change from SPSS manuals from ver 15-18.  So, where is your quote
found and when was it implemented (did they do away with the "History"
section that used to identify what changed were made and when?)?

-Mike Palij
New York University
[hidden email]




  ----- Original Message -----
  From: Rick Oliver
  To: [hidden email] 
  Sent: Wednesday, April 01, 2015 5:32 PM
  Subject: Re: Syntax rules for COMMENT in v22 FM


  http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita 

  "In the absence of a period as the command terminator, a blank line is interpreted as a command terminator."

  This is a global rule for any command.

  Rick Oliver
  Senior Information Developer
  IBM Business Analytics (SPSS)
  E-mail: [hidden email] 



  From:        Bruce Weaver <[hidden email]>
  To:        [hidden email] 
  Date:        04/01/2015 04:27 PM
  Subject:        Syntax rules for COMMENT in v22 FM
  Sent by:        "SPSSX(r) Discussion" <[hidden email]>

------------------------------------------------------------------------------



  As many group members probably know, a blank line after a comment serves as a
  comment terminator.  (Examples of this have been posted in previous threads
  on comments, and I include a small example at the bottom of this post.)  But
  as far as I can see, this is not documented in the FM.  Here's what I find
  in the v22 FM, under Syntax Rules for COMMENT:

  - The first line of a comment can begin with the keyword COMMENT or with an
  asterisk (*). Comment text
  can extend for multiple lines and can contain any characters. A period is
  required at the end of the last
  line to terminate the comment.

  - 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.

  - Comments cannot be inserted within data lines.

  - A comment on a separate line by itself within a command will cause an
  error. The comment line will
  be interpreted as a blank line, which is interpreted as a command
  terminator.

  The first bullet point above says a period is "required" on the last comment
  line.  But clearly, that is not so:  Inserting a blank line will also
  terminate the comment.  Is there some reason for not documenting this
  behavior in the FM?  

  By the way, not only did I look at the Syntax Rules for COMMENT, but I also
  did searches on "blank line" and "empty line", and both came up empty.  

  Thanks,
  Bruce


  * Example of ending a comment with a blank line.

  DATA LIST free / junk.
  BEGIN DATA
  1 2 3
  END DATA.

  * This is a multi-line comment
   with a period as a terminator.
  DESCRIPTIVES junk.

  * This is a multi-line comment
   without a period as a terminator
   and with no blank line before the next command
  DESCRIPTIVES junk.

  * This is a multi-line comment
   without a period as a terminator
   but with no blank line before the next command

  DESCRIPTIVES junk.




  -----
  --
  Bruce Weaver
  [hidden email]
  http://sites.google.com/a/lakeheadu.ca/bweaver/

  "When all else fails, RTFM."

  NOTE: My Hotmail account is not monitored regularly.
  To send me an e-mail, please use the address shown above.

  --
  View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
  Sent from the SPSSX Discussion mailing list archive at Nabble.com.

  =====================
  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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Mike
Bruce,

I inferred that that was what the writer intended but here's the
question for you:

Why would one read all of the "Universal Commands" before
reading the specific information provided for a command?
Clearly, what needs to be inserted in the section for COMMENT
is something like the following after the sentence "A period is
required at the end of the last line to terminate the comment."

"If no period is provided, a blank line between the comment
and the next line of syntax will terminate the comment."

I'd add a comment on the IBM support page to this effect but
I don't have an IBM account.  I'll leave it someone who realizes
that things should be clearer to make the comment on the page.

-Mike Palij
New York University
[hidden email]

P.S. This still leaves unanswered the question of when this went
into effect because I don't believe this was always the case.



----- Original Message -----
From: "Bruce Weaver" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 01, 2015 6:32 PM
Subject: Re: Syntax rules for COMMENT in v22 FM


> Mike, in the PDF of the Command Syntax Reference manual, look up
> *Universals
>> Commands > Running Commands*, and see the 4th bullet point under
> "Interactive Mode".  Copying & pasting from there:
>
> "In the absence of a period as the command terminator, a blank line is
> interpreted as a command
> terminator."
>
>
>
>
> Mike Palij wrote
>> I don't know where you get the quote below because this is what is
>> provided when I searched for COMMENT:
>>
>> Overview (COMMENT command)
>> COMMENT inserts explanatory text within the command sequence.
>> Comments are
>> included among the commands printed back in the output; they do not
>> become
>> part of the information saved in a data file. To include commentary
>> in the
>> dictionary of a data file, use the DOCUMENT command.
>>
>> Syntax Rules
>>
>>   a.. The first line of a comment can begin with the keyword COMMENT
>> or
>> with an asterisk (*). Comment text can extend for multiple lines and
>> can
>> contain any characters. A period is required at the end of the last
>> line
>> to terminate the comment.
>>
>> No change from SPSS manuals from ver 15-18.  So, where is your quote
>> found and when was it implemented (did they do away with the
>> "History"
>> section that used to identify what changed were made and when?)?
>>
>> -Mike Palij
>> New York University
>
>> mp26@
>
>>
>>
>>
>>
>>   ----- Original Message -----
>>   From: Rick Oliver
>>   To:
>
>> SPSSX-L@.UGA
>
>>
>>   Sent: Wednesday, April 01, 2015 5:32 PM
>>   Subject: Re: Syntax rules for COMMENT in v22 FM
>>
>>
>>
>> http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita
>>
>>   "In the absence of a period as the command terminator, a blank line
>> is
>> interpreted as a command terminator."
>>
>>   This is a global rule for any command.
>>
>>   Rick Oliver
>>   Senior Information Developer
>>   IBM Business Analytics (SPSS)
>>   E-mail:
>
>> oliverr@.ibm
>
>>
>>
>>
>>
>>   From:        Bruce Weaver &lt;
>
>> bruce.weaver@
>
>> &gt;
>>   To:
>
>> SPSSX-L@.UGA
>
>>
>>   Date:        04/01/2015 04:27 PM
>>   Subject:        Syntax rules for COMMENT in v22 FM
>>   Sent by:        "SPSSX(r) Discussion" &lt;
>
>> SPSSX-L@.UGA
>
>> &gt;
>>
>> ------------------------------------------------------------------------------
>>
>>
>>
>>   As many group members probably know, a blank line after a comment
>> serves
>> as a
>>   comment terminator.  (Examples of this have been posted in previous
>> threads
>>   on comments, and I include a small example at the bottom of this
>> post.)
>> But
>>   as far as I can see, this is not documented in the FM.  Here's what
>> I
>> find
>>   in the v22 FM, under Syntax Rules for COMMENT:
>>
>>   - The first line of a comment can begin with the keyword COMMENT or
>> with
>> an
>>   asterisk (*). Comment text
>>   can extend for multiple lines and can contain any characters. A
>> period
>> is
>>   required at the end of the last
>>   line to terminate the comment.
>>
>>   - 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.
>>
>>   - Comments cannot be inserted within data lines.
>>
>>   - A comment on a separate line by itself within a command will
>> cause an
>>   error. The comment line will
>>   be interpreted as a blank line, which is interpreted as a command
>>   terminator.
>>
>>   The first bullet point above says a period is "required" on the
>> last
>> comment
>>   line.  But clearly, that is not so:  Inserting a blank line will
>> also
>>   terminate the comment.  Is there some reason for not documenting
>> this
>>   behavior in the FM?
>>
>>   By the way, not only did I look at the Syntax Rules for COMMENT,
>> but I
>> also
>>   did searches on "blank line" and "empty line", and both came up
>> empty.
>>
>>   Thanks,
>>   Bruce
>>
>>
>>   * Example of ending a comment with a blank line.
>>
>>   DATA LIST free / junk.
>>   BEGIN DATA
>>   1 2 3
>>   END DATA.
>>
>>   * This is a multi-line comment
>>    with a period as a terminator.
>>   DESCRIPTIVES junk.
>>
>>   * This is a multi-line comment
>>    without a period as a terminator
>>    and with no blank line before the next command
>>   DESCRIPTIVES junk.
>>
>>   * This is a multi-line comment
>>    without a period as a terminator
>>    but with no blank line before the next command
>>
>>   DESCRIPTIVES junk.
>>
>>
>>
>>
>>   -----
>>   --
>>   Bruce Weaver
>>
>
>> bweaver@
>
>>   http://sites.google.com/a/lakeheadu.ca/bweaver/
>>
>>   "When all else fails, RTFM."
>>
>>   NOTE: My Hotmail account is not monitored regularly.
>>   To send me an e-mail, please use the address shown above.
>>
>>   --
>>   View this message in context:
>> http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
>>   Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>>   =====================
>>   To manage your subscription to SPSSX-L, send a message to
>>
>
>> LISTSERV@.UGA
>
>>  (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
>
>> LISTSERV@.UGA
>
>>  (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
>
>> LISTSERV@.UGA
>
>>  (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
>
>
>
>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
>
> "When all else fails, RTFM."
>
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729125.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

David Marso
Administrator
In reply to this post by Bruce Weaver
/* FWIW I ALWAYS use this style */.
/* Never know when I want to document a !Macro */.
/* I never trust the END user to not muck around with the code a DELETE a blank line ;-( */.
/* I do freelance coding and don't like to deal with support calls due to lack of foresight  */
/* DO NOT DELETE THE FOLLOWING BLANK LINE ? */

!GottaBounce reason=Getbeer / why = causeIwanna.

Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Bruce Weaver
Administrator
In reply to this post by Mike
Mike, I agree that the clarification you propose would be a nice addition to the syntax rules for COMMENT.  If read that way now, I would not have started this thread!  ;-)


Mike Palij wrote
Bruce,

I inferred that that was what the writer intended but here's the
question for you:

Why would one read all of the "Universal Commands" before
reading the specific information provided for a command?
Clearly, what needs to be inserted in the section for COMMENT
is something like the following after the sentence "A period is
required at the end of the last line to terminate the comment."

"If no period is provided, a blank line between the comment
and the next line of syntax will terminate the comment."

I'd add a comment on the IBM support page to this effect but
I don't have an IBM account.  I'll leave it someone who realizes
that things should be clearer to make the comment on the page.

-Mike Palij
New York University
[hidden email]

P.S. This still leaves unanswered the question of when this went
into effect because I don't believe this was always the case.



----- Original Message -----
From: "Bruce Weaver" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, April 01, 2015 6:32 PM
Subject: Re: Syntax rules for COMMENT in v22 FM


> Mike, in the PDF of the Command Syntax Reference manual, look up
> *Universals
>> Commands > Running Commands*, and see the 4th bullet point under
> "Interactive Mode".  Copying & pasting from there:
>
> "In the absence of a period as the command terminator, a blank line is
> interpreted as a command
> terminator."
>
>
>
>
> Mike Palij wrote
>> I don't know where you get the quote below because this is what is
>> provided when I searched for COMMENT:
>>
>> Overview (COMMENT command)
>> COMMENT inserts explanatory text within the command sequence.
>> Comments are
>> included among the commands printed back in the output; they do not
>> become
>> part of the information saved in a data file. To include commentary
>> in the
>> dictionary of a data file, use the DOCUMENT command.
>>
>> Syntax Rules
>>
>>   a.. The first line of a comment can begin with the keyword COMMENT
>> or
>> with an asterisk (*). Comment text can extend for multiple lines and
>> can
>> contain any characters. A period is required at the end of the last
>> line
>> to terminate the comment.
>>
>> No change from SPSS manuals from ver 15-18.  So, where is your quote
>> found and when was it implemented (did they do away with the
>> "History"
>> section that used to identify what changed were made and when?)?
>>
>> -Mike Palij
>> New York University
>
>> mp26@
>
>>
>>
>>
>>
>>   ----- Original Message -----
>>   From: Rick Oliver
>>   To:
>
>> SPSSX-L@.UGA
>
>>
>>   Sent: Wednesday, April 01, 2015 5:32 PM
>>   Subject: Re: Syntax rules for COMMENT in v22 FM
>>
>>
>>
>> http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita
>>
>>   "In the absence of a period as the command terminator, a blank line
>> is
>> interpreted as a command terminator."
>>
>>   This is a global rule for any command.
>>
>>   Rick Oliver
>>   Senior Information Developer
>>   IBM Business Analytics (SPSS)
>>   E-mail:
>
>> oliverr@.ibm
>
>>
>>
>>
>>
>>   From:        Bruce Weaver <
>
>> bruce.weaver@
>
>> >
>>   To:
>
>> SPSSX-L@.UGA
>
>>
>>   Date:        04/01/2015 04:27 PM
>>   Subject:        Syntax rules for COMMENT in v22 FM
>>   Sent by:        "SPSSX(r) Discussion" <
>
>> SPSSX-L@.UGA
>
>> >
>>
>> ------------------------------------------------------------------------------
>>
>>
>>
>>   As many group members probably know, a blank line after a comment
>> serves
>> as a
>>   comment terminator.  (Examples of this have been posted in previous
>> threads
>>   on comments, and I include a small example at the bottom of this
>> post.)
>> But
>>   as far as I can see, this is not documented in the FM.  Here's what
>> I
>> find
>>   in the v22 FM, under Syntax Rules for COMMENT:
>>
>>   - The first line of a comment can begin with the keyword COMMENT or
>> with
>> an
>>   asterisk (*). Comment text
>>   can extend for multiple lines and can contain any characters. A
>> period
>> is
>>   required at the end of the last
>>   line to terminate the comment.
>>
>>   - 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.
>>
>>   - Comments cannot be inserted within data lines.
>>
>>   - A comment on a separate line by itself within a command will
>> cause an
>>   error. The comment line will
>>   be interpreted as a blank line, which is interpreted as a command
>>   terminator.
>>
>>   The first bullet point above says a period is "required" on the
>> last
>> comment
>>   line.  But clearly, that is not so:  Inserting a blank line will
>> also
>>   terminate the comment.  Is there some reason for not documenting
>> this
>>   behavior in the FM?
>>
>>   By the way, not only did I look at the Syntax Rules for COMMENT,
>> but I
>> also
>>   did searches on "blank line" and "empty line", and both came up
>> empty.
>>
>>   Thanks,
>>   Bruce
>>
>>
>>   * Example of ending a comment with a blank line.
>>
>>   DATA LIST free / junk.
>>   BEGIN DATA
>>   1 2 3
>>   END DATA.
>>
>>   * This is a multi-line comment
>>    with a period as a terminator.
>>   DESCRIPTIVES junk.
>>
>>   * This is a multi-line comment
>>    without a period as a terminator
>>    and with no blank line before the next command
>>   DESCRIPTIVES junk.
>>
>>   * This is a multi-line comment
>>    without a period as a terminator
>>    but with no blank line before the next command
>>
>>   DESCRIPTIVES junk.
>>
>>
>>
>>
>>   -----
>>   --
>>   Bruce Weaver
>>
>
>> bweaver@
>
>>   http://sites.google.com/a/lakeheadu.ca/bweaver/
>>
>>   "When all else fails, RTFM."
>>
>>   NOTE: My Hotmail account is not monitored regularly.
>>   To send me an e-mail, please use the address shown above.
>>
>>   --
>>   View this message in context:
>> http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
>>   Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>>   =====================
>>   To manage your subscription to SPSSX-L, send a message to
>>
>
>> LISTSERV@.UGA
>
>>  (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
>
>> LISTSERV@.UGA
>
>>  (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
>
>> LISTSERV@.UGA
>
>>  (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
>
>
>
>
>
> -----
> --
> Bruce Weaver
> [hidden email]
> http://sites.google.com/a/lakeheadu.ca/bweaver/
>
> "When all else fails, RTFM."
>
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729125.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Rick Oliver-3
Actually, what makes the most sense is to remove the statement that says the COMMENT command requires a command terminator, since that is the source of confusion.

A period or a blank line are both globally recognized as terminating a command. There is nothing special about the COMMENT command in this regard.


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        04/01/2015 07:16 PM
Subject:        Re: Syntax rules for COMMENT in v22 FM
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Mike, I agree that the clarification you propose would be a nice addition to
the syntax rules for COMMENT.  If read that way now, I would not have
started this thread!  ;-)



Mike Palij wrote
> Bruce,
>
> I inferred that that was what the writer intended but here's the
> question for you:
>
> Why would one read all of the "Universal Commands" before
> reading the specific information provided for a command?
> Clearly, what needs to be inserted in the section for COMMENT
> is something like the following after the sentence "A period is
> required at the end of the last line to terminate the comment."
>
> "If no period is provided, a blank line between the comment
> and the next line of syntax will terminate the comment."
>
> I'd add a comment on the IBM support page to this effect but
> I don't have an IBM account.  I'll leave it someone who realizes
> that things should be clearer to make the comment on the page.
>
> -Mike Palij
> New York University

> mp26@

>
> P.S. This still leaves unanswered the question of when this went
> into effect because I don't believe this was always the case.
>
>
>
> ----- Original Message -----
> From: "Bruce Weaver" &lt;

> bruce.weaver@

> &gt;
> To: &lt;

> SPSSX-L@.UGA

> &gt;
> Sent: Wednesday, April 01, 2015 6:32 PM
> Subject: Re: Syntax rules for COMMENT in v22 FM
>
>
>> Mike, in the PDF of the Command Syntax Reference manual, look up
>> *Universals
>>> Commands > Running Commands*, and see the 4th bullet point under
>> "Interactive Mode".  Copying & pasting from there:
>>
>> "In the absence of a period as the command terminator, a blank line is
>> interpreted as a command
>> terminator."
>>
>>
>>
>>
>> Mike Palij wrote
>>> I don't know where you get the quote below because this is what is
>>> provided when I searched for COMMENT:
>>>
>>> Overview (COMMENT command)
>>> COMMENT inserts explanatory text within the command sequence.
>>> Comments are
>>> included among the commands printed back in the output; they do not
>>> become
>>> part of the information saved in a data file. To include commentary
>>> in the
>>> dictionary of a data file, use the DOCUMENT command.
>>>
>>> Syntax Rules
>>>
>>>   a.. The first line of a comment can begin with the keyword COMMENT
>>> or
>>> with an asterisk (*). Comment text can extend for multiple lines and
>>> can
>>> contain any characters. A period is required at the end of the last
>>> line
>>> to terminate the comment.
>>>
>>> No change from SPSS manuals from ver 15-18.  So, where is your quote
>>> found and when was it implemented (did they do away with the
>>> "History"
>>> section that used to identify what changed were made and when?)?
>>>
>>> -Mike Palij
>>> New York University
>>
>>> mp26@
>>
>>>
>>>
>>>
>>>
>>>   ----- Original Message -----
>>>   From: Rick Oliver
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Sent: Wednesday, April 01, 2015 5:32 PM
>>>   Subject: Re: Syntax rules for COMMENT in v22 FM
>>>
>>>
>>>
>>>
http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita
>>>
>>>   "In the absence of a period as the command terminator, a blank line
>>> is
>>> interpreted as a command terminator."
>>>
>>>   This is a global rule for any command.
>>>
>>>   Rick Oliver
>>>   Senior Information Developer
>>>   IBM Business Analytics (SPSS)
>>>   E-mail:
>>
>>> oliverr@.ibm
>>
>>>
>>>
>>>
>>>
>>>   From:        Bruce Weaver &lt;
>>
>>> bruce.weaver@
>>
>>> &gt;
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Date:        04/01/2015 04:27 PM
>>>   Subject:        Syntax rules for COMMENT in v22 FM
>>>   Sent by:        "SPSSX(r) Discussion" &lt;
>>
>>> SPSSX-L@.UGA
>>
>>> &gt;
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>>
>>>   As many group members probably know, a blank line after a comment
>>> serves
>>> as a
>>>   comment terminator.  (Examples of this have been posted in previous
>>> threads
>>>   on comments, and I include a small example at the bottom of this
>>> post.)
>>> But
>>>   as far as I can see, this is not documented in the FM.  Here's what
>>> I
>>> find
>>>   in the v22 FM, under Syntax Rules for COMMENT:
>>>
>>>   - The first line of a comment can begin with the keyword COMMENT or
>>> with
>>> an
>>>   asterisk (*). Comment text
>>>   can extend for multiple lines and can contain any characters. A
>>> period
>>> is
>>>   required at the end of the last
>>>   line to terminate the comment.
>>>
>>>   - 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.
>>>
>>>   - Comments cannot be inserted within data lines.
>>>
>>>   - A comment on a separate line by itself within a command will
>>> cause an
>>>   error. The comment line will
>>>   be interpreted as a blank line, which is interpreted as a command
>>>   terminator.
>>>
>>>   The first bullet point above says a period is "required" on the
>>> last
>>> comment
>>>   line.  But clearly, that is not so:  Inserting a blank line will
>>> also
>>>   terminate the comment.  Is there some reason for not documenting
>>> this
>>>   behavior in the FM?
>>>
>>>   By the way, not only did I look at the Syntax Rules for COMMENT,
>>> but I
>>> also
>>>   did searches on "blank line" and "empty line", and both came up
>>> empty.
>>>
>>>   Thanks,
>>>   Bruce
>>>
>>>
>>>   * Example of ending a comment with a blank line.
>>>
>>>   DATA LIST free / junk.
>>>   BEGIN DATA
>>>   1 2 3
>>>   END DATA.
>>>
>>>   * This is a multi-line comment
>>>    with a period as a terminator.
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    and with no blank line before the next command
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    but with no blank line before the next command
>>>
>>>   DESCRIPTIVES junk.
>>>
>>>
>>>
>>>
>>>   -----
>>>   --
>>>   Bruce Weaver
>>>
>>
>>> bweaver@
>>
>>>  
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>>
>>>   "When all else fails, RTFM."
>>>
>>>   NOTE: My Hotmail account is not monitored regularly.
>>>   To send me an e-mail, please use the address shown above.
>>>
>>>   --
>>>   View this message in context:
>>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
>>>   Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>>
>>>   =====================
>>>   To manage your subscription to SPSSX-L, send a message to
>>>
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>
>>
>>
>>
>> -----
>> --
>> Bruce Weaver
>>

> bweaver@

>>
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>
>> "When all else fails, RTFM."
>>
>> NOTE: My Hotmail account is not monitored regularly.
>> To send me an e-mail, please use the address shown above.
>>
>> --
>> View this message in context:
>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729125.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (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

> LISTSERV@.UGA

>  (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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729128.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Mike
Hi Rick, I would recommend AGAINST removing the statement that
COMMENT requires a command terminator because of "Case 2"
that Bruce presented, that is, (a) no period, (b) no blank line,
(c) next line following COMMENT contains a command or a procedure
which does not get executed (unless one submits the syntax files as
a batch job). 
 
You say below that both a period or a blank line "are globally recognized
as terminating a command".  Well, the existence of this thread is evidence
that this statement is false.  If it was globally known or even well known,
Bruce would not have asked the question in the first place, and Bruce is
a pretty knowledgeable guy about SPSS.  When I made the transition from
mainframe SPSS (where 99.99% of the jobs were done in batch mode),
I had to learn to use the period as terminator for a command, procedure, etc.
I feel it is best to use (a) a simple rule (e.g., always put a period at the end of
a piece of syntax, where appropriate; if someone re-uses the syntax in another
program with a different context, the period will still serve as a terminator
while one is not guaranteed the that a blank line will be available) and/or
(b) if you have two options, such as use a terminator (period) or a blank line
make it explicit, especially for something like COMMENT.  I've written
an acceptable sentence below that can be inserted into the syntax manual
that makes the situation with COMMENT, I think, perfectly clear.  Why
make it harder for the user to figure out what is going (e.g., "Gee, I don't
remember a period at the end of the COMMENTs I saw, so I guess I don't
need it. Now let me get rid of that blank line after COMMENT to reduce
the number of lines in my syntax file -- don't think this can happen? and often?).
 
I could be wrong but just remember that few people will know SPSS
as well as you and what may seem obvious to you, may be a complete
puzzle to a less knowledgeable user.
 
-Mike Palij
New York University
 
 
----- Original Message -----
Sent: Thursday, April 02, 2015 10:24 AM
Subject: Re: Syntax rules for COMMENT in v22 FM

Actually, what makes the most sense is to remove the statement that says the COMMENT command requires a command terminator, since that is the source of confusion.

A period or a blank line are both globally recognized as terminating a command. There is nothing special about the COMMENT command in this regard.


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        04/01/2015 07:16 PM
Subject:        Re: Syntax rules for COMMENT in v22 FM
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Mike, I agree that the clarification you propose would be a nice addition to
the syntax rules for COMMENT.  If read that way now, I would not have
started this thread!  ;-)



Mike Palij wrote

> Bruce,
>
> I inferred that that was what the writer intended but here's the
> question for you:
>
> Why would one read all of the "Universal Commands" before
> reading the specific information provided for a command?
> Clearly, what needs to be inserted in the section for COMMENT
> is something like the following after the sentence "A period is
> required at the end of the last line to terminate the comment."
>
> "If no period is provided, a blank line between the comment
> and the next line of syntax will terminate the comment."
>
> I'd add a comment on the IBM support page to this effect but
> I don't have an IBM account.  I'll leave it someone who realizes
> that things should be clearer to make the comment on the page.
>
> -Mike Palij
> New York University

> mp26@

>
> P.S. This still leaves unanswered the question of when this went
> into effect because I don't believe this was always the case.
>
>
>
> ----- Original Message -----
> From: "Bruce Weaver" &lt;

> bruce.weaver@

> &gt;
> To: &lt;

> SPSSX-L@.UGA

> &gt;
> Sent: Wednesday, April 01, 2015 6:32 PM
> Subject: Re: Syntax rules for COMMENT in v22 FM
>
>
>> Mike, in the PDF of the Command Syntax Reference manual, look up
>> *Universals
>>> Commands > Running Commands*, and see the 4th bullet point under
>> "Interactive Mode".  Copying & pasting from there:
>>
>> "In the absence of a period as the command terminator, a blank line is
>> interpreted as a command
>> terminator."
>>
>>
>>
>>
>> Mike Palij wrote
>>> I don't know where you get the quote below because this is what is
>>> provided when I searched for COMMENT:
>>>
>>> Overview (COMMENT command)
>>> COMMENT inserts explanatory text within the command sequence.
>>> Comments are
>>> included among the commands printed back in the output; they do not
>>> become
>>> part of the information saved in a data file. To include commentary
>>> in the
>>> dictionary of a data file, use the DOCUMENT command.
>>>
>>> Syntax Rules
>>>
>>>   a.. The first line of a comment can begin with the keyword COMMENT
>>> or
>>> with an asterisk (*). Comment text can extend for multiple lines and
>>> can
>>> contain any characters. A period is required at the end of the last
>>> line
>>> to terminate the comment.
>>>
>>> No change from SPSS manuals from ver 15-18.  So, where is your quote
>>> found and when was it implemented (did they do away with the
>>> "History"
>>> section that used to identify what changed were made and when?)?
>>>
>>> -Mike Palij
>>> New York University
>>
>>> mp26@
>>
>>>
>>>
>>>
>>>
>>>   ----- Original Message -----
>>>   From: Rick Oliver
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Sent: Wednesday, April 01, 2015 5:32 PM
>>>   Subject: Re: Syntax rules for COMMENT in v22 FM
>>>
>>>
>>>
>>>
http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita
>>>
>>>   "In the absence of a period as the command terminator, a blank line
>>> is
>>> interpreted as a command terminator."
>>>
>>>   This is a global rule for any command.
>>>
>>>   Rick Oliver
>>>   Senior Information Developer
>>>   IBM Business Analytics (SPSS)
>>>   E-mail:
>>
>>> oliverr@.ibm
>>
>>>
>>>
>>>
>>>
>>>   From:        Bruce Weaver &lt;
>>
>>> bruce.weaver@
>>
>>> &gt;
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Date:        04/01/2015 04:27 PM
>>>   Subject:        Syntax rules for COMMENT in v22 FM
>>>   Sent by:        "SPSSX(r) Discussion" &lt;
>>
>>> SPSSX-L@.UGA
>>
>>> &gt;
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>>
>>>   As many group members probably know, a blank line after a comment
>>> serves
>>> as a
>>>   comment terminator.  (Examples of this have been posted in previous
>>> threads
>>>   on comments, and I include a small example at the bottom of this
>>> post.)
>>> But
>>>   as far as I can see, this is not documented in the FM.  Here's what
>>> I
>>> find
>>>   in the v22 FM, under Syntax Rules for COMMENT:
>>>
>>>   - The first line of a comment can begin with the keyword COMMENT or
>>> with
>>> an
>>>   asterisk (*). Comment text
>>>   can extend for multiple lines and can contain any characters. A
>>> period
>>> is
>>>   required at the end of the last
>>>   line to terminate the comment.
>>>
>>>   - 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.
>>>
>>>   - Comments cannot be inserted within data lines.
>>>
>>>   - A comment on a separate line by itself within a command will
>>> cause an
>>>   error. The comment line will
>>>   be interpreted as a blank line, which is interpreted as a command
>>>   terminator.
>>>
>>>   The first bullet point above says a period is "required" on the
>>> last
>>> comment
>>>   line.  But clearly, that is not so:  Inserting a blank line will
>>> also
>>>   terminate the comment.  Is there some reason for not documenting
>>> this
>>>   behavior in the FM?
>>>
>>>   By the way, not only did I look at the Syntax Rules for COMMENT,
>>> but I
>>> also
>>>   did searches on "blank line" and "empty line", and both came up
>>> empty.
>>>
>>>   Thanks,
>>>   Bruce
>>>
>>>
>>>   * Example of ending a comment with a blank line.
>>>
>>>   DATA LIST free / junk.
>>>   BEGIN DATA
>>>   1 2 3
>>>   END DATA.
>>>
>>>   * This is a multi-line comment
>>>    with a period as a terminator.
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    and with no blank line before the next command
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    but with no blank line before the next command
>>>
>>>   DESCRIPTIVES junk.
>>>
>>>
>>>
>>>
>>>   -----
>>>   --
>>>   Bruce Weaver
>>>
>>
>>> bweaver@
>>
>>>  
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>>
>>>   "When all else fails, RTFM."
>>>
>>>   NOTE: My Hotmail account is not monitored regularly.
>>>   To send me an e-mail, please use the address shown above.
>>>
>>>   --
>>>   View this message in context:
>>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
>>>   Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>>
>>>   =====================
>>>   To manage your subscription to SPSSX-L, send a message to
>>>
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>
>>
>>
>>
>> -----
>> --
>> Bruce Weaver
>>

> bweaver@

>>
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>
>> "When all else fails, RTFM."
>>
>> NOTE: My Hotmail account is not monitored regularly.
>> To send me an e-mail, please use the address shown above.
>>
>> --
>> View this message in context:
>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729125.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (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

> LISTSERV@.UGA

>  (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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729128.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Rick Oliver-3
By "globally recognized" I meant recognized by the application, not "globally known" by users.

It's a global rule. It applies to all commands. COMMENT is not a special case. As stated earlier, I think the confusion was caused by an erroneous statement concerning are required period command terminator in the COMMENT command. The COMMENT command behaves just like any other command in this regard: When interactive rules are in effect, a command can be ended with a period or a blank line.

If this is not clear, you can see this rule in effect in the Syntax Editor:

*This is a comment, color-coded gray
This is still the comment because there is no period above so this is still color-coded gray.
This is not a comment because there was a period above so this is no gray.
*This is new comment with no period at the end

This is not a comment because there is a blank line above.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        "Mike Palij" <[hidden email]>
To:        Rick Oliver/Chicago/IBM@IBMUS, <[hidden email]>
Cc:        "Michael Palij" <[hidden email]>
Date:        04/02/2015 10:15 AM
Subject:        Re: Syntax rules for COMMENT in v22 FM




Hi Rick, I would recommend AGAINST removing the statement that
COMMENT requires a command terminator because of "Case 2"
that Bruce presented, that is, (a) no period, (b) no blank line,
(c) next line following COMMENT contains a command or a procedure
which does not get executed (unless one submits the syntax files as
a batch job).  
 
You say below that both a period or a blank line "are globally recognized
as terminating a command".  Well, the existence of this thread is evidence
that this statement is false.  If it was globally known or even well known,
Bruce would not have asked the question in the first place, and Bruce is
a pretty knowledgeable guy about SPSS.  When I made the transition from
mainframe SPSS (where 99.99% of the jobs were done in batch mode),
I had to learn to use the period as terminator for a command, procedure, etc.
I feel it is best to use (a) a simple rule (e.g., always put a period at the end of
a piece of syntax, where appropriate; if someone re-uses the syntax in another
program with a different context, the period will still serve as a terminator
while one is not guaranteed the that a blank line will be available) and/or
(b) if you have two options, such as use a terminator (period) or a blank line
make it explicit, especially for something like COMMENT.  I've written
an acceptable sentence below that can be inserted into the syntax manual
that makes the situation with COMMENT, I think, perfectly clear.  Why
make it harder for the user to figure out what is going (e.g., "Gee, I don't
remember a period at the end of the COMMENTs I saw, so I guess I don't
need it. Now let me get rid of that blank line after COMMENT to reduce
the number of lines in my syntax file -- don't think this can happen? and often?).
 
I could be wrong but just remember that few people will know SPSS
as well as you and what may seem obvious to you, may be a complete
puzzle to a less knowledgeable user.
 
-Mike Palij
New York University
mp26@...
 
 
----- Original Message -----
From: Rick Oliver
To: [hidden email]
Sent: Thursday, April 02, 2015 10:24 AM
Subject: Re: Syntax rules for COMMENT in v22 FM

Actually, what makes the most sense is to remove the statement that says the COMMENT command requires a command terminator, since that is the source of confusion.

A period or a blank line are both globally recognized as terminating a command. There is nothing special about the COMMENT command in this regard.



Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        
Bruce Weaver <[hidden email]>
To:        
[hidden email]
Date:        
04/01/2015 07:16 PM
Subject:        
Re: Syntax rules for COMMENT in v22 FM
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




Mike, I agree that the clarification you propose would be a nice addition to
the syntax rules for COMMENT.  If read that way now, I would not have
started this thread!  ;-)



Mike Palij wrote
> Bruce,
>
> I inferred that that was what the writer intended but here's the
> question for you:
>
> Why would one read all of the "Universal Commands" before
> reading the specific information provided for a command?
> Clearly, what needs to be inserted in the section for COMMENT
> is something like the following after the sentence "A period is
> required at the end of the last line to terminate the comment."
>
> "If no period is provided, a blank line between the comment
> and the next line of syntax will terminate the comment."
>
> I'd add a comment on the IBM support page to this effect but
> I don't have an IBM account.  I'll leave it someone who realizes
> that things should be clearer to make the comment on the page.
>
> -Mike Palij
> New York University

> mp26@

>
> P.S. This still leaves unanswered the question of when this went
> into effect because I don't believe this was always the case.
>
>
>
> ----- Original Message -----
> From: "Bruce Weaver" &lt;

> bruce.weaver@

> &gt;
> To: &lt;

> SPSSX-L@.UGA

> &gt;
> Sent: Wednesday, April 01, 2015 6:32 PM
> Subject: Re: Syntax rules for COMMENT in v22 FM
>
>
>> Mike, in the PDF of the Command Syntax Reference manual, look up
>> *Universals
>>> Commands > Running Commands*, and see the 4th bullet point under
>> "Interactive Mode".  Copying & pasting from there:
>>
>> "In the absence of a period as the command terminator, a blank line is
>> interpreted as a command
>> terminator."
>>
>>
>>
>>
>> Mike Palij wrote
>>> I don't know where you get the quote below because this is what is
>>> provided when I searched for COMMENT:
>>>
>>> Overview (COMMENT command)
>>> COMMENT inserts explanatory text within the command sequence.
>>> Comments are
>>> included among the commands printed back in the output; they do not
>>> become
>>> part of the information saved in a data file. To include commentary
>>> in the
>>> dictionary of a data file, use the DOCUMENT command.
>>>
>>> Syntax Rules
>>>
>>>   a.. The first line of a comment can begin with the keyword COMMENT
>>> or
>>> with an asterisk (*). Comment text can extend for multiple lines and
>>> can
>>> contain any characters. A period is required at the end of the last
>>> line
>>> to terminate the comment.
>>>
>>> No change from SPSS manuals from ver 15-18.  So, where is your quote
>>> found and when was it implemented (did they do away with the
>>> "History"
>>> section that used to identify what changed were made and when?)?
>>>
>>> -Mike Palij
>>> New York University
>>
>>> mp26@
>>
>>>
>>>
>>>
>>>
>>>   ----- Original Message -----
>>>   From: Rick Oliver
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Sent: Wednesday, April 01, 2015 5:32 PM
>>>   Subject: Re: Syntax rules for COMMENT in v22 FM
>>>
>>>
>>>
>>>
http://www-01.ibm.com/support/knowledgecenter/SSLVMB_23.0.0/spss/base/syn_universals_running_commands.dita
>>>
>>>   "In the absence of a period as the command terminator, a blank line
>>> is
>>> interpreted as a command terminator."
>>>
>>>   This is a global rule for any command.
>>>
>>>   Rick Oliver
>>>   Senior Information Developer
>>>   IBM Business Analytics (SPSS)
>>>   E-mail:
>>
>>> oliverr@.ibm
>>
>>>
>>>
>>>
>>>
>>>   From:        Bruce Weaver &lt;
>>
>>> bruce.weaver@
>>
>>> &gt;
>>>   To:
>>
>>> SPSSX-L@.UGA
>>
>>>
>>>   Date:        04/01/2015 04:27 PM
>>>   Subject:        Syntax rules for COMMENT in v22 FM
>>>   Sent by:        "SPSSX(r) Discussion" &lt;
>>
>>> SPSSX-L@.UGA
>>
>>> &gt;
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>>
>>>   As many group members probably know, a blank line after a comment
>>> serves
>>> as a
>>>   comment terminator.  (Examples of this have been posted in previous
>>> threads
>>>   on comments, and I include a small example at the bottom of this
>>> post.)
>>> But
>>>   as far as I can see, this is not documented in the FM.  Here's what
>>> I
>>> find
>>>   in the v22 FM, under Syntax Rules for COMMENT:
>>>
>>>   - The first line of a comment can begin with the keyword COMMENT or
>>> with
>>> an
>>>   asterisk (*). Comment text
>>>   can extend for multiple lines and can contain any characters. A
>>> period
>>> is
>>>   required at the end of the last
>>>   line to terminate the comment.
>>>
>>>   - 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.
>>>
>>>   - Comments cannot be inserted within data lines.
>>>
>>>   - A comment on a separate line by itself within a command will
>>> cause an
>>>   error. The comment line will
>>>   be interpreted as a blank line, which is interpreted as a command
>>>   terminator.
>>>
>>>   The first bullet point above says a period is "required" on the
>>> last
>>> comment
>>>   line.  But clearly, that is not so:  Inserting a blank line will
>>> also
>>>   terminate the comment.  Is there some reason for not documenting
>>> this
>>>   behavior in the FM?
>>>
>>>   By the way, not only did I look at the Syntax Rules for COMMENT,
>>> but I
>>> also
>>>   did searches on "blank line" and "empty line", and both came up
>>> empty.
>>>
>>>   Thanks,
>>>   Bruce
>>>
>>>
>>>   * Example of ending a comment with a blank line.
>>>
>>>   DATA LIST free / junk.
>>>   BEGIN DATA
>>>   1 2 3
>>>   END DATA.
>>>
>>>   * This is a multi-line comment
>>>    with a period as a terminator.
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    and with no blank line before the next command
>>>   DESCRIPTIVES junk.
>>>
>>>   * This is a multi-line comment
>>>    without a period as a terminator
>>>    but with no blank line before the next command
>>>
>>>   DESCRIPTIVES junk.
>>>
>>>
>>>
>>>
>>>   -----
>>>   --
>>>   Bruce Weaver
>>>
>>
>>> bweaver@
>>
>>>  
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>>
>>>   "When all else fails, RTFM."
>>>
>>>   NOTE: My Hotmail account is not monitored regularly.
>>>   To send me an e-mail, please use the address shown above.
>>>
>>>   --
>>>   View this message in context:
>>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120.html
>>>   Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>>
>>>   =====================
>>>   To manage your subscription to SPSSX-L, send a message to
>>>
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>> LISTSERV@.UGA
>>
>>>  (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
>>
>>
>>
>>
>>
>> -----
>> --
>> Bruce Weaver
>>

> bweaver@

>>
http://sites.google.com/a/lakeheadu.ca/bweaver/
>>
>> "When all else fails, RTFM."
>>
>> NOTE: My Hotmail account is not monitored regularly.
>> To send me an e-mail, please use the address shown above.
>>
>> --
>> View this message in context:
>>
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729125.html
>> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>>
>> =====================
>> To manage your subscription to SPSSX-L, send a message to
>>

> LISTSERV@.UGA

>  (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

> LISTSERV@.UGA

>  (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





-----
--
Bruce Weaver
[hidden email]

http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Syntax-rules-for-COMMENT-in-v22-FM-tp5729120p5729128.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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
LISTSERV@... (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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Rich Ulrich
"globally recognized" is a very familiar term to computer programmers,
but not so much to other people.  Just sayin'.

I know that manuals often are styled to show options rather than discuss
their merits, but allowing your Comment to be terminated by a blank line
is a VERY BAD IDEA:  It creates code that is apt to "break" when someone
else touches it.  Once it is broken, even if you did it to yourself, this error
borders on invisibility until you think to search for "missing periods".  (Is
everyone alert to gray-toning in the syntax editor?)  This is one case where
HELP should offer an opinion, "Don't DO that."

As mentioned by the list's most experienced user,
/*   this is a comment */ 
is a style that avoids problems.

--
Rich Ulrich


Date: Thu, 2 Apr 2015 10:23:56 -0500
From: [hidden email]
Subject: Re: Syntax rules for COMMENT in v22 FM
To: [hidden email]

By "globally recognized" I meant recognized by the application, not "globally known" by users.

It's a global rule. It applies to all commands. COMMENT is not a special case. As stated earlier, I think the confusion was caused by an erroneous statement concerning are required period command terminator in the COMMENT command. The COMMENT command behaves just like any other command in this regard: When interactive rules are in effect, a command can be ended with a period or a blank line.

If this is not clear, you can see this rule in effect in the Syntax Editor:

*This is a comment, color-coded gray
This is still the comment because there is no period above so this is still color-coded gray.
This is not a comment because there was a period above so this is no gray.
*This is new comment with no period at the end

This is not a comment because there is a blank line above.
...
===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

David Marso
Administrator
Consider the following:
I like to decorate my macros with a header describing what it does, inputs, outputs, side effects...
The following creates NO END of misery.
It should be documented that
* !macrocall * results in invocation of the macro
while /* macrocall */ does not.
Usually the latter is desired and the former, well....FUBAR and difficult to debug.

* SPSS MACRO: !DoSomething *.
* Does something *.
* Expects nothing *.
DEFINE !DoSomething ()
!Nothing
!ENDDEFINE .

DEFINE Nothing ()
ECHO 'Nothing'.
!ENDDEFINE.

VS

/* SPSS MACRO: !DoSomethingElse /*.
/* Does something Else /*.
/* Expects nothing /*.
DEFINE !DoSomethingElse ()
!Nothing
!ENDDEFINE .

DEFINE Nothing ()
ECHO 'Nothing'.
!ENDDEFINE.


Rich Ulrich wrote
"globally recognized" is a very familiar term to computer programmers,
but not so much to other people.  Just sayin'.

I know that manuals often are styled to show options rather than discuss
their merits, but allowing your Comment to be terminated by a blank line
is a VERY BAD IDEA:  It creates code that is apt to "break" when someone
else touches it.  Once it is broken, even if you did it to yourself, this error
borders on invisibility until you think to search for "missing periods".  (Is
everyone alert to gray-toning in the syntax editor?)  This is one case where
HELP should offer an opinion, "Don't DO that."

As mentioned by the list's most experienced user,
/*   this is a comment */  
is a style that avoids problems.

--
Rich Ulrich

Date: Thu, 2 Apr 2015 10:23:56 -0500
From: [hidden email]
Subject: Re: Syntax rules for COMMENT in v22 FM
To: [hidden email]

By "globally recognized" I meant
recognized by the application, not "globally known" by users.



It's a global rule. It applies to all
commands. COMMENT is not a special case. As stated earlier, I think the
confusion was caused by an erroneous statement concerning are required
period command terminator in the COMMENT command. The COMMENT command behaves
just like any other command in this regard: When interactive rules are
in effect, a command can be ended with a period or a blank line.



If this is not clear, you can see this
rule in effect in the Syntax Editor:



*This is a comment, color-coded gray

This is still the comment because there
is no period above so this is still color-coded gray.

This is not a comment because there
was a period above so this is no gray.

*This is new comment with no period
at the end



This is not a comment because there
is a blank line above.


...
     
=====================
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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Syntax rules for COMMENT in v22 FM

Bruce Weaver
Administrator
In the past, I have resorted to
/* this style of commenting */
only when I was including a macro name in the comment.  More generally, I have been in the habit of starting comment lines with an asterisk (thus avoiding 2 keystrokes for the slashes).  

But you & Rich make a good point about /* providing a stronger safeguard against problems and broken code.  Perhaps I'll have to start adding those extra keystrokes.



David Marso wrote
Consider the following:
I like to decorate my macros with a header describing what it does, inputs, outputs, side effects...
The following creates NO END of misery.
It should be documented that
* !macrocall * results in invocation of the macro
while /* macrocall */ does not.
Usually the latter is desired and the former, well....FUBAR and difficult to debug.

* SPSS MACRO: !DoSomething *.
* Does something *.
* Expects nothing *.
DEFINE !DoSomething ()
!Nothing
!ENDDEFINE .

DEFINE Nothing ()
ECHO 'Nothing'.
!ENDDEFINE.

VS

/* SPSS MACRO: !DoSomethingElse /*.
/* Does something Else /*.
/* Expects nothing /*.
DEFINE !DoSomethingElse ()
!Nothing
!ENDDEFINE .

DEFINE Nothing ()
ECHO 'Nothing'.
!ENDDEFINE.


Rich Ulrich wrote
"globally recognized" is a very familiar term to computer programmers,
but not so much to other people.  Just sayin'.

I know that manuals often are styled to show options rather than discuss
their merits, but allowing your Comment to be terminated by a blank line
is a VERY BAD IDEA:  It creates code that is apt to "break" when someone
else touches it.  Once it is broken, even if you did it to yourself, this error
borders on invisibility until you think to search for "missing periods".  (Is
everyone alert to gray-toning in the syntax editor?)  This is one case where
HELP should offer an opinion, "Don't DO that."

As mentioned by the list's most experienced user,
/*   this is a comment */  
is a style that avoids problems.

--
Rich Ulrich

Date: Thu, 2 Apr 2015 10:23:56 -0500
From: [hidden email]
Subject: Re: Syntax rules for COMMENT in v22 FM
To: [hidden email]

By "globally recognized" I meant
recognized by the application, not "globally known" by users.



It's a global rule. It applies to all
commands. COMMENT is not a special case. As stated earlier, I think the
confusion was caused by an erroneous statement concerning are required
period command terminator in the COMMENT command. The COMMENT command behaves
just like any other command in this regard: When interactive rules are
in effect, a command can be ended with a period or a blank line.



If this is not clear, you can see this
rule in effect in the Syntax Editor:



*This is a comment, color-coded gray

This is still the comment because there
is no period above so this is still color-coded gray.

This is not a comment because there
was a period above so this is no gray.

*This is new comment with no period
at the end



This is not a comment because there
is a blank line above.


...
     
=====================
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).