Re: + at beginning of syntax line

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

Re: + at beginning of syntax line

David Marso
Administrator
>Jan
>
>If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
>
>Like I said, "More haste, less speed."
>
>John

OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall <[hidden email]> wrote:

>Jan
>
>If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.

>
>Like I said, "More haste, less speed."
>
>John
>  ----- Original Message -----
>  From: J McClure
>  To: [hidden email]
>  Sent: Monday, September 06, 2010 7:26 PM
>  Subject: + at beginning of syntax line
>
>
>
>  Hi,
>  I don't know who to direct this to but I was mystified by the '+' sign
>  at the beginning of the line for certain syntax (loops, do if etc) and
>  I'd like to suggest that the purpose be added to the Command Syntax
>  Reference Guide. I searched the Guide several times (very tedious
>  because there are many, many + signs in the document) and gave up after
>  awhile. I searched the internet a number of times and found only
>  examples but no explanations. I asked my husband who knows a dozen
>  computer languages and he didn't know the purpose. I finally did a
>  slightly different search and found the answer in an online tutorial at
>  http://www.stat-help.com/spss.pdf.
>  Thanks for all the help provided on this site! It's been immensely
>  valuable.
>  Jan
>
>  =====================
>  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
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: + at beginning of syntax line

Art Kendall
In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:
Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall [hidden email] wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
 ----- Original Message -----
 From: J McClure
 To: [hidden email]
 Sent: Monday, September 06, 2010 7:26 PM
 Subject: + at beginning of syntax line



 Hi,
 I don't know who to direct this to but I was mystified by the '+' sign
 at the beginning of the line for certain syntax (loops, do if etc) and
 I'd like to suggest that the purpose be added to the Command Syntax
 Reference Guide. I searched the Guide several times (very tedious
 because there are many, many + signs in the document) and gave up after
 awhile. I searched the internet a number of times and found only
 examples but no explanations. I asked my husband who knows a dozen
 computer languages and he didn't know the purpose. I finally did a
 slightly different search and found the answer in an online tutorial at
 http://www.stat-help.com/spss.pdf.
 Thanks for all the help provided on this site! It's been immensely
 valuable.
 Jan

 =====================
 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Auto indent syntax option

Gary Oliver-3
Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, September 15, 2010 12:40 AM
To: [hidden email]
Subject: Re: + at beginning of syntax line

In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:
Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall [hidden email] wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
 ----- Original Message -----
 From: J McClure
 To: [hidden email]
 Sent: Monday, September 06, 2010 7:26 PM
 Subject: + at beginning of syntax line



 Hi,
 I don't know who to direct this to but I was mystified by the '+' sign
 at the beginning of the line for certain syntax (loops, do if etc) and
 I'd like to suggest that the purpose be added to the Command Syntax
 Reference Guide. I searched the Guide several times (very tedious
 because there are many, many + signs in the document) and gave up after
 awhile. I searched the internet a number of times and found only
 examples but no explanations. I asked my husband who knows a dozen
 computer languages and he didn't know the purpose. I finally did a
 slightly different search and found the answer in an online tutorial at
 http://www.stat-help.com/spss.pdf.
 Thanks for all the help provided on this site! It's been immensely
 valuable.
 Jan

 =====================
 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: Auto indent syntax option

Art Kendall
Thank you.

If by "optional extra" you mean extra money, then I would disagree. It should be a prominent button and or a set of options in defaults the way the options for colors are.

David is an extremely skilled programmer and seemingly still finds the vertical alignment useful despite years of experience as an expert programmer.  The editor should make it easy to produce syntax that follows good programming practices.  That way even beginners can produce the readable code that communicates to people as well as to the machine.

Art Kendall
Social Research Consultants

On 9/14/2010 7:12 PM, Gary Oliver wrote:
Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, September 15, 2010 12:40 AM
To: [hidden email]
Subject: Re: + at beginning of syntax line

In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:
Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall [hidden email] wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
 ----- Original Message -----
 From: J McClure
 To: [hidden email]
 Sent: Monday, September 06, 2010 7:26 PM
 Subject: + at beginning of syntax line



 Hi,
 I don't know who to direct this to but I was mystified by the '+' sign
 at the beginning of the line for certain syntax (loops, do if etc) and
 I'd like to suggest that the purpose be added to the Command Syntax
 Reference Guide. I searched the Guide several times (very tedious
 because there are many, many + signs in the document) and gave up after
 awhile. I searched the internet a number of times and found only
 examples but no explanations. I asked my husband who knows a dozen
 computer languages and he didn't know the purpose. I finally did a
 slightly different search and found the answer in an online tutorial at
 http://www.stat-help.com/spss.pdf.
 Thanks for all the help provided on this site! It's been immensely
 valuable.
 Jan

 =====================
 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
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Jon K Peck

Bear in mind that Statistics 19 does have an autoindent feature in the syntax editor.  More could be done here, but this may be helpful.

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Art Kendall <[hidden email]>
To: [hidden email]
Date: 09/15/2010 08:35 AM
Subject: Re: [SPSSX-L] Auto indent syntax option
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Thank you.

If by "optional extra" you mean extra money, then I would disagree. It should be a prominent button and or a set of options in defaults the way the options for colors are.

David is an extremely skilled programmer and seemingly still finds the vertical alignment useful despite years of experience as an expert programmer.  The editor should make it easy to produce syntax that follows good programming practices.  That way even beginners can produce the readable code that communicates to people as well as to the machine.

Art Kendall
Social Research Consultants

On 9/14/2010 7:12 PM, Gary Oliver wrote:

Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent:
Wednesday, September 15, 2010 12:40 AM
To:
[hidden email]
Subject:
Re: + at beginning of syntax line


In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before

you can even crawl, you would have picked up already that the + indicates a
continuation line.

Like I said, "More haste, less speed."

John

OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall
<johnfhall@...> wrote:


Jan

If you worked with syntax from the beginning, and didn't try to run before

you can even crawl, you would have picked up already that the + indicates a
continuation line.

Like I said, "More haste, less speed."

John
----- Original Message -----
From: J McClure
To:
[hidden email]
Sent: Monday, September 06, 2010 7:26 PM
Subject: + at beginning of syntax line



Hi,
I don't know who to direct this to but I was mystified by the '+' sign
at the beginning of the line for certain syntax (loops, do if etc) and
I'd like to suggest that the purpose be added to the Command Syntax
Reference Guide. I searched the Guide several times (very tedious
because there are many, many + signs in the document) and gave up after
awhile. I searched the internet a number of times and found only
examples but no explanations. I asked my husband who knows a dozen
computer languages and he didn't know the purpose. I finally did a
slightly different search and found the answer in an online tutorial at
http://www.stat-help.com/spss.pdf.
Thanks for all the help provided on this site! It's been immensely
valuable.
Jan

=====================
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
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 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: Auto indent syntax option

David Marso
Administrator
In reply to this post by Gary Oliver-3
Why Thank You Art,
I find the ability to visually detect the structural and logical flow of a
program to be an essential quality of well written code.  I have been using
Visual Basic since 1997 and SPSS since the mid 80's.  A few months ago I
began porting some of my VB6 applications to VB.Net and I was absolutely
delighted to discover that indentation of code is enforced automatically by
the program.
Type the beginning clause of a structural element (For, With Select Case ...
and enter and it will automatically complete the structure.
It also does this consistently for all nested elements.
For years I used to type FOR I=blah to blah, hit Enter and Next I, then back
up to enter my code..
I pretty much align everything as I go.  Same with SPSS.  It takes less time
to add these visual cues while writing the program than to try to figure out
whether all your LOOPS, DO IF , DO REPEAT etc are all aligned.
When you go back to code later you can either scratch your head muttering
WTF for half an hour or jump right in and continue where you left off.
David
>    David is an extremely skilled programmer and seemingly still finds
>    the vertical alignment useful despite years of experience as an
>    expert programmer.&nbsp; The editor should make it easy to produce syntax
>    that follows good programming practices.&nbsp; That way even beginners
>    can produce the readable code that communicates to people as well as
>    to the machine.<br>
>    <br>
>    Art Kendall<br>
>

=====================
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: Auto indent syntax option

Art Kendall
> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.
So do I. The very point I was trying to get at. You said it more clearly.
In FORTRAN 77 (why it was called that in 1971 since it worked in 1971 I
have no idea), a programmer could use 1or more tabs to separate the
statement number from the statement.  If the programmer used too few or
too many PRETTY would adjust the number of tabs.  This was very helpful
to the user to try to compare the logic (s)he wanted and what the
machine interpreted the logic to be.

The computer world is very much more developed today. It should be
trivial for SPSS to put that kind of feature in the editor.  In the
meanwhile, perhaps someone could write a PYTHON script to PRETTY the
syntax. As you said VB.Net enforces it automatically.  That clearly
should be a proof of feasibility.


Art



On 9/15/2010 11:59 AM, David Marso wrote:

> Why Thank You Art,
> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.  I have been using
> Visual Basic since 1997 and SPSS since the mid 80's.  A few months ago I
> began porting some of my VB6 applications to VB.Net and I was absolutely
> delighted to discover that indentation of code is enforced automatically by
> the program.
> Type the beginning clause of a structural element (For, With Select Case ...
> and enter and it will automatically complete the structure.
> It also does this consistently for all nested elements.
> For years I used to type FOR I=blah to blah, hit Enter and Next I, then back
> up to enter my code..
> I pretty much align everything as I go.  Same with SPSS.  It takes less time
> to add these visual cues while writing the program than to try to figure out
> whether all your LOOPS, DO IF , DO REPEAT etc are all aligned.
> When you go back to code later you can either scratch your head muttering
> WTF for half an hour or jump right in and continue where you left off.
> David
>>     David is an extremely skilled programmer and seemingly still finds
>>     the vertical alignment useful despite years of experience as an
>>     expert programmer.&nbsp; The editor should make it easy to produce syntax
>>     that follows good programming practices.&nbsp; That way even beginners
>>     can produce the readable code that communicates to people as well as
>>     to the machine.<br>
>>     <br>
>>     Art Kendall<br>
>>
> =====================
> 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Art Kendall
In reply to this post by Jon K Peck
Great!  I did not notice that in the Beta. 

What about some of the other features I have suggested over the years such as conventional/symbolic operators; space around arithmetic, assignment and logical operators; and vertical alignment of assignment operators?  Are those possible PYTHON functions until they get put into the actual editor options?

I understand that a font that made parentheses, angle brackets, periods, commas equal signs, exclamations points, more visible would be more difficult in non-English languages. Does PYTHON have bolding and character enlargement that would appear in the syntax editor, even if it would not appear in posts that don't use HTML?


As you know I have a big soap box about human factors (aka usability) in programs.

Art Kendall
Social Research Consultants

On 9/15/2010 10:51 AM, Jon K Peck wrote:

Bear in mind that Statistics 19 does have an autoindent feature in the syntax editor.  More could be done here, but this may be helpful.

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Art Kendall [hidden email]
To: [hidden email]
Date: 09/15/2010 08:35 AM
Subject: Re: [SPSSX-L] Auto indent syntax option
Sent by: "SPSSX(r) Discussion" [hidden email]





Thank you.

If by "optional extra" you mean extra money, then I would disagree. It should be a prominent button and or a set of options in defaults the way the options for colors are.

David is an extremely skilled programmer and seemingly still finds the vertical alignment useful despite years of experience as an expert programmer.  The editor should make it easy to produce syntax that follows good programming practices.  That way even beginners can produce the readable code that communicates to people as well as to the machine.

Art Kendall
Social Research Consultants

On 9/14/2010 7:12 PM, Gary Oliver wrote:

Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent:
Wednesday, September 15, 2010 12:40 AM
To:
[hidden email]
Subject:
Re: + at beginning of syntax line


In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before

you can even crawl, you would have picked up already that the + indicates a
continuation line.

Like I said, "More haste, less speed."

John

OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall
[hidden email] wrote:


Jan

If you worked with syntax from the beginning, and didn't try to run before

you can even crawl, you would have picked up already that the + indicates a
continuation line.

Like I said, "More haste, less speed."

John
----- Original Message -----
From: J McClure
To:
[hidden email]
Sent: Monday, September 06, 2010 7:26 PM
Subject: + at beginning of syntax line



Hi,
I don't know who to direct this to but I was mystified by the '+' sign
at the beginning of the line for certain syntax (loops, do if etc) and
I'd like to suggest that the purpose be added to the Command Syntax
Reference Guide. I searched the Guide several times (very tedious
because there are many, many + signs in the document) and gave up after
awhile. I searched the internet a number of times and found only
examples but no explanations. I asked my husband who knows a dozen
computer languages and he didn't know the purpose. I finally did a
slightly different search and found the answer in an online tutorial at
http://www.stat-help.com/spss.pdf.
Thanks for all the help provided on this site! It's been immensely
valuable.
Jan

=====================
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
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Rick Oliver-3
In reply to this post by Art Kendall
Auto-indentingis available  in release 19. I just auto-indented the following in the Syntax Editor:

loop something.
    do if something.
        compute something.
    end if.
end loop.


From: Art Kendall <[hidden email]>
To: [hidden email]
Date: 09/15/2010 02:58 PM
Subject: Re: Auto indent syntax option
Sent by: "SPSSX(r) Discussion" <[hidden email]>





> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.
So do I. The very point I was trying to get at. You said it more clearly.
In FORTRAN 77 (why it was called that in 1971 since it worked in 1971 I
have no idea), a programmer could use 1or more tabs to separate the
statement number from the statement.  If the programmer used too few or
too many PRETTY would adjust the number of tabs.  This was very helpful
to the user to try to compare the logic (s)he wanted and what the
machine interpreted the logic to be.

The computer world is very much more developed today. It should be
trivial for SPSS to put that kind of feature in the editor.  In the
meanwhile, perhaps someone could write a PYTHON script to PRETTY the
syntax. As you said VB.Net enforces it automatically.  That clearly
should be a proof of feasibility.


Art



On 9/15/2010 11:59 AM, David Marso wrote:
> Why Thank You Art,
> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.  I have been using
> Visual Basic since 1997 and SPSS since the mid 80's.  A few months ago I
> began porting some of my VB6 applications to VB.Net and I was absolutely
> delighted to discover that indentation of code is enforced automatically by
> the program.
> Type the beginning clause of a structural element (For, With Select Case ...
> and enter and it will automatically complete the structure.
> It also does this consistently for all nested elements.
> For years I used to type FOR I=blah to blah, hit Enter and Next I, then back
> up to enter my code..
> I pretty much align everything as I go.  Same with SPSS.  It takes less time
> to add these visual cues while writing the program than to try to figure out
> whether all your LOOPS, DO IF , DO REPEAT etc are all aligned.
> When you go back to code later you can either scratch your head muttering
> WTF for half an hour or jump right in and continue where you left off.
> David
>>     David is an extremely skilled programmer and seemingly still finds
>>     the vertical alignment useful despite years of experience as an
>>     expert programmer.&nbsp; The editor should make it easy to produce syntax
>>     that follows good programming practices.&nbsp; That way even beginners
>>     can produce the readable code that communicates to people as well as
>>     to the machine.<br>
>>     <br>
>>     Art Kendall<br>
>>
> =====================
> 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: Auto indent syntax option

Art Kendall
Great glad to see it.  I did not notice it in the Beta.  Looking forward to delivery of 19

Art

On 9/15/2010 4:25 PM, Rick Oliver wrote:
Auto-indentingis available  in release 19. I just auto-indented the following in the Syntax Editor:

loop something.
    do if something.
        compute something.
    end if.
end loop.


From: Art Kendall [hidden email]
To: [hidden email]
Date: 09/15/2010 02:58 PM
Subject: Re: Auto indent syntax option
Sent by: "SPSSX(r) Discussion" [hidden email]





> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.
So do I. The very point I was trying to get at. You said it more clearly.
In FORTRAN 77 (why it was called that in 1971 since it worked in 1971 I
have no idea), a programmer could use 1or more tabs to separate the
statement number from the statement.  If the programmer used too few or
too many PRETTY would adjust the number of tabs.  This was very helpful
to the user to try to compare the logic (s)he wanted and what the
machine interpreted the logic to be.

The computer world is very much more developed today. It should be
trivial for SPSS to put that kind of feature in the editor.  In the
meanwhile, perhaps someone could write a PYTHON script to PRETTY the
syntax. As you said VB.Net enforces it automatically.  That clearly
should be a proof of feasibility.


Art



On 9/15/2010 11:59 AM, David Marso wrote:
> Why Thank You Art,
> I find the ability to visually detect the structural and logical flow of a
> program to be an essential quality of well written code.  I have been using
> Visual Basic since 1997 and SPSS since the mid 80's.  A few months ago I
> began porting some of my VB6 applications to VB.Net and I was absolutely
> delighted to discover that indentation of code is enforced automatically by
> the program.
> Type the beginning clause of a structural element (For, With Select Case ...
> and enter and it will automatically complete the structure.
> It also does this consistently for all nested elements.
> For years I used to type FOR I=blah to blah, hit Enter and Next I, then back
> up to enter my code..
> I pretty much align everything as I go.  Same with SPSS.  It takes less time
> to add these visual cues while writing the program than to try to figure out
> whether all your LOOPS, DO IF , DO REPEAT etc are all aligned.
> When you go back to code later you can either scratch your head muttering
> WTF for half an hour or jump right in and continue where you left off.
> David
>>     David is an extremely skilled programmer and seemingly still finds
>>     the vertical alignment useful despite years of experience as an
>>     expert programmer.&nbsp; The editor should make it easy to produce syntax
>>     that follows good programming practices.&nbsp; That way even beginners
>>     can produce the readable code that communicates to people as well as
>>     to the machine.<br>
>>     <br>
>>     Art Kendall<br>
>>
> =====================
> 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Bruce Weaver
Administrator
In reply to this post by Rick Oliver-3
Rick Oliver wrote
Auto-indentingis available  in release 19. I just auto-indented the
following in the Syntax Editor:

loop something.
    do if something.
        compute something.
    end if.
end loop.
Hi Rick.  Can auto-indent be configured to put a + or - at the left margin on the indented lines?  I.e.,

loop something.
-   do if something.
-       compute something.
-   end if.
end loop.

I do realize that this is no longer necessary if one uses INSERT FILE rather than INCLUDE FILE.  I just like this style for some reason--perhaps because it makes it easier to distinguish between start lines and continuation lines.  (We've only just started using v18 here, so I can't check for myself.)

Thanks,
Bruce
--
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: Auto indent syntax option

Rick Oliver-3
I don't think auto-indent can be configured to insert + or - at the start of the line (and as Dave Marso pointed out, the + or - at the start of a line does not indicate a "continuation" line.) If  you like that convention, I think you'll have to continue to manually indent.


From: Bruce Weaver <[hidden email]>
To: [hidden email]
Date: 09/15/2010 04:38 PM
Subject: Re: Auto indent syntax option
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Rick Oliver wrote:
>
> Auto-indentingis available  in release 19. I just auto-indented the
> following in the Syntax Editor:
>
> loop something.
>     do if something.
>         compute something.
>     end if.
> end loop.
>
>

Hi Rick.  Can auto-indent be configured to put a + or - at the left margin
on the indented lines?  I.e.,

loop something.
-   do if something.
-       compute something.
-   end if.
end loop.

I do realize that this is no longer necessary if one uses INSERT FILE rather
than INCLUDE FILE.  I just like this style for some reason--perhaps because
it makes it easier to distinguish between start lines and continuation
lines.  (We've only just started using v18 here, so I can't check for
myself.)

Thanks,
Bruce


-----
--
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/Re-at-beginning-of-syntax-line-tp2836597p2841427.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


Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Jon K Peck

True, you can't configure autoindent to work differently.  But if all you want is for every indented line (maybe ignoring blank lines) to have a plus or dash inserted at the front, that would be a pretty easy scripting job, and you could even create a toolbar button for that.  If you want it to do a more elaborate analysis of syntax to decide, well, it all depends on how elaborate.

Bear in mind, considering some of the other comments on this thread, that compared to Fortran or Basic, which are fairly trivial to parse, just the definition of the Statistics command set that the syntax editor uses consists of over 38,000 lines of xml - and that doesn't cover everything.

It would be easy to do something like TextPad used to do - just recognizing names of commands and keywords, but that is easily fooled by a variable named, say, contrast or any other keyword, so that really isn't good enough.

Regards,

Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: Rick Oliver/Chicago/IBM@IBMUS
To: [hidden email]
Date: 09/15/2010 04:58 PM
Subject: Re: [SPSSX-L] Auto indent syntax option
Sent by: "SPSSX(r) Discussion" <[hidden email]>





I don't think auto-indent can be configured to insert + or - at the start of the line (and as Dave Marso pointed out, the + or - at the start of a line does not indicate a "continuation" line.) If  you like that convention, I think you'll have to continue to manually indent.

From: Bruce Weaver <[hidden email]>
To: [hidden email]
Date: 09/15/2010 04:38 PM
Subject: Re: Auto indent syntax option
Sent by: "SPSSX(r) Discussion" <[hidden email]>






Rick Oliver wrote:
>
> Auto-indentingis available  in release 19. I just auto-indented the
> following in the Syntax Editor:
>
> loop something.
>     do if something.
>         compute something.
>     end if.
> end loop.
>
>

Hi Rick.  Can auto-indent be configured to put a + or - at the left margin
on the indented lines?  I.e.,

loop something.
-   do if something.
-       compute something.
-   end if.
end loop.

I do realize that this is no longer necessary if one uses INSERT FILE rather
than INCLUDE FILE.  I just like this style for some reason--perhaps because
it makes it easier to distinguish between start lines and continuation
lines.  (We've only just started using v18 here, so I can't check for
myself.)

Thanks,
Bruce


-----
--
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/Re-at-beginning-of-syntax-line-tp2836597p2841427.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




Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Gary Oliver-3
In reply to this post by Art Kendall
 
Hi Art
 
I didn't mean optional extra as in cost
 
I meant optional extra as in making it each user's decision whether to turn it on
 
Please take a look at v19 (which I don't have access to and let us know what you think
 
Warm regards/gary



From: Art Kendall [mailto:[hidden email]]
Sent: Thursday, September 16, 2010 12:28 AM
To: Gary Oliver
Cc: [hidden email]
Subject: Re: [SPSSX-L] Auto indent syntax option

Thank you.

If by "optional extra" you mean extra money, then I would disagree. It should be a prominent button and or a set of options in defaults the way the options for colors are.

David is an extremely skilled programmer and seemingly still finds the vertical alignment useful despite years of experience as an expert programmer.  The editor should make it easy to produce syntax that follows good programming practices.  That way even beginners can produce the readable code that communicates to people as well as to the machine.

Art Kendall
Social Research Consultants

On 9/14/2010 7:12 PM, Gary Oliver wrote:
Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, September 15, 2010 12:40 AM
To: [hidden email]
Subject: Re: + at beginning of syntax line

In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:
Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall [hidden email] wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
 ----- Original Message -----
 From: J McClure
 To: [hidden email]
 Sent: Monday, September 06, 2010 7:26 PM
 Subject: + at beginning of syntax line



 Hi,
 I don't know who to direct this to but I was mystified by the '+' sign
 at the beginning of the line for certain syntax (loops, do if etc) and
 I'd like to suggest that the purpose be added to the Command Syntax
 Reference Guide. I searched the Guide several times (very tedious
 because there are many, many + signs in the document) and gave up after
 awhile. I searched the internet a number of times and found only
 examples but no explanations. I asked my husband who knows a dozen
 computer languages and he didn't know the purpose. I finally did a
 slightly different search and found the answer in an online tutorial at
 http://www.stat-help.com/spss.pdf.
 Thanks for all the help provided on this site! It's been immensely
 valuable.
 Jan

 =====================
 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: Auto indent syntax option

Bruce Weaver
Administrator
In reply to this post by Rick Oliver-3
Rick Oliver wrote
I don't think auto-indent can be configured to insert + or - at the start
of the line (and as Dave Marso pointed out, the + or - at the start of a
line does not indicate a "continuation" line.) If  you like that
convention, I think you'll have to continue to manually indent.
Thanks Rick.  

Re the point that - and + in column 1 do not signify continuation lines, I could have given a clearer example of what I meant.  E.g.,

loop something.
-   do if something.
-       compute something with a lot of conditions that
          wrap around to a second
          or third line.
-   end if.
end loop.

Here, inclusion of - (or +) in column 1 helps me pick out more easily the continuation lines -- they are the lines with no character in column 1, of course.

Cheers,
Bruce
--
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: Auto indent syntax option

Art Kendall
In reply to this post by Gary Oliver-3
Indenting is a good programming practice.  It clarifies to the writer and readers what the machine interprets as the logic.  I hope that it will be a feature of the student versions.

The Beta version has expired and I did not notice the autoindent in it. 
I don't think 19 has shipped yet, but will keep this in mind.

Art

On 9/15/2010 11:49 PM, Gary Oliver wrote:
 
Hi Art
 
I didn't mean optional extra as in cost
 
I meant optional extra as in making it each user's decision whether to turn it on
 
Please take a look at v19 (which I don't have access to and let us know what you think
 
Warm regards/gary



From: Art Kendall [[hidden email]]
Sent: Thursday, September 16, 2010 12:28 AM
To: Gary Oliver
Cc: [hidden email]
Subject: Re: [SPSSX-L] Auto indent syntax option

Thank you.

If by "optional extra" you mean extra money, then I would disagree. It should be a prominent button and or a set of options in defaults the way the options for colors are.

David is an extremely skilled programmer and seemingly still finds the vertical alignment useful despite years of experience as an expert programmer.  The editor should make it easy to produce syntax that follows good programming practices.  That way even beginners can produce the readable code that communicates to people as well as to the machine.

Art Kendall
Social Research Consultants

On 9/14/2010 7:12 PM, Gary Oliver wrote:
Hi Art
 
I really like your idea of having a separate process to automate the indentation. I think that having it as an "optional extra" would allow it to be used as a useful visual check i.e. do the coding then run the pretty program and re-inspect the code. Your point about losing the colours is also germaine.
 
I hope SPSS is listening!
 
Warm regards/gary


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, September 15, 2010 12:40 AM
To: [hidden email]
Subject: Re: + at beginning of syntax line

In 1971 DEC FORTRAN had a program called PRETTY that automated such indentation for vertical alignment.
I like the visual improvement to the syntax editor but would like more,
I have frequently suggested have a PRETTY program for SPSS syntax.
It would include availability of casing  (ALL UC, Leading Caps, all lc) for procedures/operators, options/op; conversion of symbolic operators to/from conventional operator especially to avoid the distinct uses of the equal sign; automated vertical alignment via indentation; vertical alignment of assignment operators; spaces either side of assignment operators; a font that made angle brackets, commas, periods, etc. very much more visually distinct;etc.
(I went back and italicized features that were not there in 1971.)

These would help within SPSS and be retained (unlike the colors) when pasted into newsgroups, discussion list, and private emails for reviews or seeking/giving help.

Art Kendall
Social Research Consultants

On 9/12/2010 4:59 AM, David Marso wrote:
Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
OK, first off John, no need to be RUDE!  Other people have already pointed
that out so I will refrain from additional chastising.

OTOH, you should slow down yourself and NOT add injury to insult by
following such with INCORRECT information!
"+ indicates a continuation line.  "

NO!!!!!!!!  It does NOT!
I am surprised that I'm the first one to point this out to you!

It actually indicates that a COMMAND which should NORMALLY begin in column 1
(if run as "batch" or via INCLUDE FILE ) is indented.
Yes, some people actually indent code to indicate logical structure and aid
in debugging and preservation of sanity.
Have you ever run into something like this?

DO IF Blah.
LOOP #=1 to 20
LOOP ##= 2 to 25.
DO IF # AND ##
COMPUTE BARF.
ELSE IF NOT (# OR ##).
DO IF Blah AND ##.
RECODE XXX (poop=piss)(else=0).
ELSE.
COMPUTE Whatever.
END IF
END IF
END LOOP.
END LOOP.
ELSE.
COMPUTE OOPS=0.
END IF.
------------------
Well, that is purely unacceptable for both aesthetic and professional
reasons, unless one's goal is job preservation through perpetuation of
unreadable code.
So:
DO IF Blah.
+  LOOP #=1 to 20
-    LOOP ##= 2 to 25.
+      DO IF # AND ##
-        COMPUTE BARF.
+      ELSE IF NOT (# OR ##).
-        DO IF Blah AND ##.
+          RECODE XXX (poop=piss)(else=0).
-        ELSE.
+          COMPUTE Whatever.
-        END IF
+      END IF
-    END LOOP.
+  END LOOP.
ELSE.
-  COMPUTE OOPS=0.
END IF.

Continuation line?  I think not!
OTOH, as Jon Peck points out, INCLUDE is legacy, use INSERT so no need for
column 1 signifiers.

I am pretty sure I DON'T agree with that statement.
I am using version 11.5 and don't plan to upgrade anytime soon even though
Python looks appealing .  OMS looks interesting too, but nothing I can't do
with AGGREGATE or scripting-.
You can keep the BFugly Java GUI.  WTF were they thinking with that ugly
monstrosity?

CASESTOVARS AND VARSTOCASES are for pussies;-)!
I can't determine prices for SPSS on the website but I bet it would run me
several thousand dollars.

Are there not still older mainframe or unix versions of SPSS running?
I write code which will work on **ALL** versions of SPSS (back to 6.1.4,
6.1.4 because MACRO was hopeless  (totally hosed/fundamentally
broken/unpredictable wrt line wrapping/rectocranially inverted) until Tex
Hull fixed it after about 2 years of my pleading with the development people
to fix the damned thing (this was circa 1994 or 95?-  -poor tables users-
You can imagine the BFugly workarounds required for that.  OTOH, most of
them were marketing research types so I had very little (read NO) sympathy
for their screwed up table titles.. Sorry, do it by hand...(Yeah, service
with a smile and a BOO HISS behind the mute button.  I really loved talking
to the barely functional robots from the IRS and the military! **NOT** OTOH,
I'm not absolutely sure that I'd want the IRS to be hiring SMART people ??
 They'll likely find another 100 ways to fuck you over, novel data
analytical strategies for merge and putge DING DING DING AUDIT!!).
David



On Mon, 6 Sep 2010 20:42:15 +0200, John F Hall [hidden email] wrote:

Jan

If you worked with syntax from the beginning, and didn't try to run before
you can even crawl, you would have picked up already that the + indicates a
continuation line.
Like I said, "More haste, less speed."

John
 ----- Original Message -----
 From: J McClure
 To: [hidden email]
 Sent: Monday, September 06, 2010 7:26 PM
 Subject: + at beginning of syntax line



 Hi,
 I don't know who to direct this to but I was mystified by the '+' sign
 at the beginning of the line for certain syntax (loops, do if etc) and
 I'd like to suggest that the purpose be added to the Command Syntax
 Reference Guide. I searched the Guide several times (very tedious
 because there are many, many + signs in the document) and gave up after
 awhile. I searched the internet a number of times and found only
 examples but no explanations. I asked my husband who knows a dozen
 computer languages and he didn't know the purpose. I finally did a
 slightly different search and found the answer in an online tutorial at
 http://www.stat-help.com/spss.pdf.
 Thanks for all the help provided on this site! It's been immensely
 valuable.
 Jan

 =====================
 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
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Possible to purchase previous releasess of SPSS?

J P-6
Hello,
 
I just spent about 1/2 an hour trying to find the answer this quesiton on the PASW website. So I pose it to the list: I would like to purchase a stand alone copy of version 17 (base only). Does anyone know if this is possible and if so how to go about it?
 
Thanks!
 
John

Reply | Threaded
Open this post in threaded view
|

Re: Auto indent syntax option

Richard Ristow
In reply to this post by Art Kendall
At 10:28 AM 9/15/2010, Art Kendall wrote:

>David [Marso] is an extremely skilled programmer and seemingly still
>finds the vertical alignment useful despite years of experience as
>an expert programmer.

Goodness, it's the skilled programmers who DO do it. And go to
various other lengths to make their code readable, like breaking
statements at logical points into lines of reasonable length, and
lining up corresponding clauses vertically. (Yeah, I'm compulsive
about that. My code is far from compact, but I *think* it reads well.)

Back in the GOOD OLD DAYS, Real Programmers like Mel(1) gloried in
understanding obscure code and obscure techniques that baffled
everybody else. "His code was not easy for someone else to modify."
It was fun, in its way, but once the code hit the limit even the Real
Programmer could understand, nobody could either fix it or extend it.

Not to speak of a Real Programmer who'd been away from the code for six weeks.
=============================
(1) http://www.cs.utah.edu/~elb/folklore/mel.html

=====================
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: Auto indent syntax option

Richard Ristow
In reply to this post by Jon K Peck
At 07:11 PM 9/15/2010, Jon K Peck wrote:

>If all you want is for every indented line (maybe ignoring blank
>lines) to have a plus or dash inserted at the front, that would be a
>pretty easy scripting job, and you could even create a toolbar button for that.

Would it be that easy? You'd have to distinguish indented lines that
begin new statements from indented lines that continue existing
statements. I've run into that often enough, using a text editor to
do the indenting.

=====================
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: Auto indent syntax option

Art Kendall
  Evidently version 19 will have automatic indenting.

FORTRAN 77 (which is the version on DEC machines in 1971) could do it
and it did not have the convention of ending a command with a period.

SPSS colors complete procedures and (in)complete loops etc. so most of
the logic should already be there in the editor.
A statement is incomplete until a period id hit in the text parser.

Art Kendall
Social Research Consultants


On 9/20/2010 9:58 PM, Richard Ristow wrote:

> At 07:11 PM 9/15/2010, Jon K Peck wrote:
>
>> If all you want is for every indented line (maybe ignoring blank
>> lines) to have a plus or dash inserted at the front, that would be a
>> pretty easy scripting job, and you could even create a toolbar button
>> for that.
>
> Would it be that easy? You'd have to distinguish indented lines that
> begin new statements from indented lines that continue existing
> statements. I've run into that often enough, using a text editor to
> do the indenting.
>
> =====================
> 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
Art Kendall
Social Research Consultants