[comp.sys.mac] LightSpeed Pascal pretty-printing

kent@lloyd.camex.uucp (Kent Borg) (11/03/88)

In article <1151@usfvax2.EDU> pollock@usfvax2.UUCP (Wayne Pollock) writes:
>Below is a LSP program (re-pretty-printed to save screen space; why oh why
>can't I turn this option off?).  ...

Because it is not an `option'.

Rich explained this a while back.  What I remember: One of the reasons
LSP has such a fast turn around is that when you say `Compile' a lot
of (all of?) the parsing of your program is already done, it happened
when you typed the `;' for that line.  The compiler is storing your
program in some tight, tokenized, internal form.  This has the natural
side effect striping out formatting information that the compiler has
no use for.  Remember back when you were playing around with
interpreted BASIC?  You typed in `print' (or `?') but the listing said
`PRINT'.  Similar effect.

Certainly the pretty printing could be avoided without loosing the
fast turn around and source code debugging LSP does so very well, but
I can see how these changes would be far from trivial and not without
cost in time and space.  That coupled with idea that pretty-printing
might be a _feature_ helps explain why it is the way it is.

LSP 2.0 is supposed to allow the user lots of opportunity to twiddle
the pretty printing parameters--but it is still part of the product.

Personally, though I like the pretty printing, I do have some gripes:

It will sometimes `kidnap' an end statement from old code when I am
adding new code, leaving me unbalanced (more than usual I mean).  In
this case it is looking at my work too soon.  

On the other side it is sometimes hard to get it to reconsider a line
once I have fixed a typo.  This was a particular problem for a class I
recently taught at the Boston Computer Society where LSP was used for
examples.  Students would have a perfectly fine Pascal statement
sitting on the screen, but the editor was still upset over an earlier
typo.  In this case it is looking at our work too late.  

This incremental stuff is complicated, and when I think about it, I am
impressed with how gracefully they do it.

Further consideration for all you grumblers: LSP is great and there
are ways they could make it still better.  Getting rid of the pretty
printing will not be trivial.  Do you really want them to take time
away from making substantial improvements just to fix this?  Wouldn't
you rather get inline assembly code, or something else that actually
adds power to the product?  If so, say so, and don't complain so much.

(Personal LSP request: Editor support of arrow keys, option arrow
keys, command arrow keys, shift option arrow keys, etc.)

Kent Borg 
kent@lloyd.uucp 
or 
hscfvax!lloyd!kent

singer@endor.harvard.edu (Rich Siegel) (11/05/88)

In article <244@lloyd.camex.uucp> kent@lloyd.UUCP (Kent Borg) writes:
>(Personal LSP request: Editor support of arrow keys, option arrow
>keys, command arrow keys, shift option arrow keys, etc.)

	Consider this: In version 2.0

	Arrow keys move as you expect.

	Option-Left and and Option-Right arrow move t oprevious and next
semantic unit (a token, that is). Option-Up and Option-Down move to the 
previous or next procedure/function.

	Command-Left and Command-Right arrow move to beginning/end of
current line, Command-Up and Command-Down arrow move to top/bottom of window.

	Command-Mouse Down in the title bar gives a list (in order of
implementation) of all procedures in the file. Command-Option mouse down 
gives the same, sorted alphabetically. Selecting an item takes you to the
beginning of that prorcedure. Option-Mouse gives a listing of units USED
by the current file, and choosing an item opens the source file that contains
the unit.

		--Rich




Rich Siegel
Staff Software Developer
THINK Technologies Division, Symantec Corp.
Internet: singer@endor.harvard.edu
UUCP: ..harvard!endor!singer
Phone: (617) 275-4800 x305

Any opinions stated in this article do not necessarily reflect the views
or policies of Symantec Corporation or its employees.

pollock@usfvax2.EDU (Wayne Pollock) (11/12/88)

The fact that the code is stored in some tokenized form is of course why
you can't turn off the pretty printing *all of the time*.  What I want, some-
thing like a "hard return" (say, command-return) to always break a line could
fairly easily be added in without a lot of hard work.  Even just a wrap-around
margin at column 80 would make me happy - horizontal scrolling is for the
birds!  (I wanna see my program!)  Also some way of joining two lines into
one should be available (for those "end else statement" lines);  Given the
limited screen space available (yes someday I will buy a 19" monitor), I want:
a) to see the whole program without any horizontal scrolling, and
b) to see as much of my program as possible in one screen (e.g., don't put
   else and end on separate lines).

And as you say, LSP is truly a great product at a very good price; I suppose
I should be happy enough - its just that I want it ALL!!!

Wayne Pollock (The MAD Scientist)	pollock@usfvax2.usf.edu
Usenet:		...!{uflorida, codas}!usfvax2!pollock
GEnie:		W.POLLOCK