Date: Thu, 16 Sep 2010 14:21:39 -0400
Reply-To: Art@DrKendall.org
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Art@DrKendall.org>
Organization: Social Research Consultants
Subject: Re: Auto indent syntax option
In-Reply-To: <FCBCF3AD65DA994692355227E0CC0371014BD10E49B4@EXCMS1.econ.usyd.edu.au>
Content-type: text/html; charset=ISO-8859-1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
The Beta version has expired and I did not notice the autoindent in
it. <br>
I don't think 19 has shipped yet, but will keep this in mind.<br>
<br>
Art<br>
<br>
On 9/15/2010 11:49 PM, Gary Oliver wrote:
<blockquote
cite="mid:FCBCF3AD65DA994692355227E0CC0371014BD10E49B4@EXCMS1.econ.usyd.edu.au"
type="cite">
<title></title>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta content="MSHTML 6.00.6000.17063" name="GENERATOR">
<div dir="ltr" align="left"> </div>
<div dir="ltr" align="left"><span class="717134703-16092010"><font
size="2" color="#0000ff" face="Arial">Hi Art</font></span></div>
<div dir="ltr" align="left"><span class="717134703-16092010"></span> </div>
<div dir="ltr" align="left"><span class="717134703-16092010"><font
size="2" color="#0000ff" face="Arial">I didn't mean optional
extra as in cost </font></span></div>
<div dir="ltr" align="left"><span class="717134703-16092010"></span> </div>
<div dir="ltr" align="left"><span class="717134703-16092010"><font
size="2" color="#0000ff" face="Arial">I meant optional extra
as in making it each user's decision whether to turn it on </font></span></div>
<div dir="ltr" align="left"><span class="717134703-16092010"></span> </div>
<div dir="ltr" align="left"><span class="717134703-16092010"><font
size="2" color="#0000ff" face="Arial">Please take a look at
v19 (which I don't have access to and let us know what you
think</font></span></div>
<div dir="ltr" align="left"><span class="717134703-16092010"></span> </div>
<div dir="ltr" align="left"><span class="717134703-16092010"><font
size="2" color="#0000ff" face="Arial">Warm regards/gary</font></span></div>
<br>
<br>
<blockquote dir="ltr" style="padding-left: 5px; margin-left: 5px;
border-left: 2px solid rgb(0, 0, 255); margin-right: 0px;">
<div class="OutlookMessageHeader" dir="ltr" align="left"
lang="en-us">
<hr tabindex="-1"> <font size="2" face="Tahoma"><b>From:</b>
Art Kendall [<a class="moz-txt-link-freetext" href="mailto:Art@DrKendall.org">mailto:Art@DrKendall.org</a>] <br>
<b>Sent:</b> Thursday, September 16, 2010 12:28 AM<br>
<b>To:</b> Gary Oliver<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:SPSSX-L@LISTSERV.UGA.EDU">SPSSX-L@LISTSERV.UGA.EDU</a><br>
<b>Subject:</b> Re: [SPSSX-L] Auto indent syntax option<br>
</font><br>
</div>
Thank you.<br>
<br>
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.<br>
<br>
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.<br>
<br>
Art Kendall<br>
Social Research Consultants<br>
<br>
On 9/14/2010 7:12 PM, Gary Oliver wrote:
<blockquote
cite="mid:FCBCF3AD65DA994692355227E0CC0371014BD10E499A@EXCMS1.econ.usyd.edu.au"
type="cite">
<meta content="MSHTML 6.00.6000.17063" name="GENERATOR">
<div dir="ltr" align="left">
<div dir="ltr" align="left"><span class="192220823-14092010"><font
size="2" color="#0000ff" face="Arial">Hi Art</font></span></div>
<div dir="ltr" align="left"><span class="192220823-14092010"></span> </div>
<div dir="ltr" align="left"><span class="192220823-14092010"><font
face="Arial"><font color="#0000ff"><font size="2">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.<span class="889491023-14092010"> Your point
about losing the colours is also germaine.</span></font></font></font></span></div>
<div dir="ltr" align="left"><span class="192220823-14092010"></span> </div>
<div dir="ltr" align="left"><span class="192220823-14092010"><span
class="889491023-14092010"><font size="2"
color="#0000ff" face="Arial">I hope SPSS is
listening!</font></span></span></div>
<div dir="ltr" align="left"><span class="192220823-14092010"></span> </div>
<div dir="ltr" align="left"><span class="192220823-14092010"><font
size="2" color="#0000ff" face="Arial">Warm
regards/gary</font></span></div>
</div>
<br>
<blockquote style="padding-left: 5px; margin-left: 5px;
border-left: 2px solid rgb(0, 0, 255); margin-right: 0px;">
<div class="OutlookMessageHeader" dir="ltr" align="left"
lang="en-us">
<hr tabindex="-1"> <font size="2" face="Tahoma"><b>From:</b>
SPSSX(r) Discussion [<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="mailto:SPSSX-L@LISTSERV.UGA.EDU">mailto:SPSSX-L@LISTSERV.UGA.EDU</a>]
<b>On Behalf Of </b>Art Kendall<br>
<b>Sent:</b> Wednesday, September 15, 2010 12:40 AM<br>
<b>To:</b> <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:SPSSX-L@LISTSERV.UGA.EDU">SPSSX-L@LISTSERV.UGA.EDU</a><br>
<b>Subject:</b> Re: + at beginning of syntax line<br>
</font><br>
</div>
In 1971 DEC FORTRAN had a program called PRETTY that
automated such indentation for vertical alignment.<br>
I like the visual improvement to the syntax editor but would
like more,<br>
I have frequently suggested have a PRETTY program for SPSS
syntax.<br>
It would include availability of casing (ALL UC, Leading
Caps, all lc) for procedures/operators, options/op; <i>conversion
of symbolic operators to/from conventional operator
especially to avoid the distinct uses of the equal sign;</i>
automated vertical alignment via indentation; <i>vertical
alignment of assignment operators;</i> spaces either side
of assignment operators; <i>a font that made angle
brackets, commas, periods, etc. very much more visually
distinct;etc.<br>
</i>(I went back and italicized features that were not there
in 1971.)<br>
<br>
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.<br>
<br>
Art Kendall<br>
Social Research Consultants<br>
<br>
On 9/12/2010 4:59 AM, David Marso wrote:
<blockquote
cite="mid:201009120859.o8BAlVr4031962@willow.cc.uga.edu"
type="cite">
<blockquote type="cite">
<pre wrap="">Jan
If you worked with syntax from the beginning, and didn't try to run before
</pre>
</blockquote>
<pre wrap="">you can even crawl, you would have picked up already that the + indicates a
continuation line.
</pre>
<blockquote type="cite">
<pre wrap="">Like I said, "More haste, less speed."
John
</pre>
</blockquote>
<pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:johnfhall@orange.fr" moz-do-not-send="true"><johnfhall@orange.fr></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Jan
If you worked with syntax from the beginning, and didn't try to run before
</pre>
</blockquote>
<pre wrap="">you can even crawl, you would have picked up already that the + indicates a
continuation line.
</pre>
<blockquote type="cite">
<pre wrap="">Like I said, "More haste, less speed."
John
----- Original Message -----
From: J McClure
To: <a class="moz-txt-link-abbreviated" href="mailto:SPSSX-L@LISTSERV.UGA.EDU" moz-do-not-send="true">SPSSX-L@LISTSERV.UGA.EDU</a>
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
<a class="moz-txt-link-freetext" href="http://www.stat-help.com/spss.pdf" moz-do-not-send="true">http://www.stat-help.com/spss.pdf</a>.
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
<a class="moz-txt-link-abbreviated" href="mailto:LISTSERV@LISTSERV.UGA.EDU" moz-do-not-send="true">LISTSERV@LISTSERV.UGA.EDU</a> (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
</pre>
</blockquote>
<pre wrap="">=====================
To manage your subscription to SPSSX-L, send a message to
<a class="moz-txt-link-abbreviated" href="mailto:LISTSERV@LISTSERV.UGA.EDU" moz-do-not-send="true">LISTSERV@LISTSERV.UGA.EDU</a> (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
</pre>
</blockquote>
===================== To manage your subscription to
SPSSX-L, send a message to <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:LISTSERV@LISTSERV.UGA.EDU">LISTSERV@LISTSERV.UGA.EDU</a>
(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 </blockquote>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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