× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Sat, 18 Aug 2018 at 03:11, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:

Y'all - the most recent versions of RDi do split the line at the cursor
when you press Enter - to get the previous behavior - to get a new line,
you press Ctrl-Enter.

That was very welcome, but there is a complex interaction between the
'line splitter' and 'SQL formatter' functionality that is not
immediately intuitive to me. Maybe the list can help. Here is some
source:

exec sql
declare fred cursor for
select *
from systables;

x = y + 500;

I've got it in an SQLRPGLE.

My Preferences in Remote Systems > Remote Systems LPEX Editor > IBM i
Parsers > ILE RPG > Free-Form SQL Formatting are simple. Everything
is unchecked except Automatic indentkeys (Filter on SQL).

In Remote Systems > Remote Systems LPEX Editor > IBM i Parsers > ILE
RPG > Key Behavior I have
Alt-S splits and shifts
Enter splits in free form
Automatic indent
Automatic closure of control block
Tab indents

In LPEX Editor > User Key Actions, I have nothing.

Now put the cursor on the '5' in 'x = y + 500;'
Press Enter.
In my window, the 500 moves down one line and is shifted to the left
so it lines up with the '=' sign above.
I rather like that
This works the same in Insert or Overstrike mode..

Now place the cursor on the 'c' in 'declare fred cursor for'.
Press Enter.
My editor gives me a new, empty line after 'declare fred cursor for'.
It behaves exactly like Ctrl-Enter in free-form calcs.
I'm not keen on that because in my head I think of SQL statements as
free-form calculations. RDi has a different opinion :-)

Try the same experiment using the numeric keypad Enter, and it's
different to each other yet again. This time the SQL spli/shifts but
the calcs split/shift/no indent. I'd be OK with any of these
behaviours if they were entirely consistent - if Main Enter always did
X and Numeric Enter always did Y.

You've been on the RDi road with me for a long time Vern, so I know I
don't need to go into the history of the thing. I have a hypothesis
that because RDi was born in the columnar age, grew into a teen in the
columnar age, and is now a college student in the emoji age, there are
more than a few internal RDi processes that simply assume columnar
code. As we find and report them to IBM, I'm sure they'll get
addressed. I've never been more optimistic about RPG and RDi in 30
years. It's a great time to be an RPG programmer.

As for my Microsoft colleagues ribbing me about this or that, well
that's what bonds us together as programmers. They have their own
complaints about their IDE. I truly feel for the RDi developers.
They're writing a thing for programmers. Speaking for myself, as a
programmer, I Could Do That Better Then Those Other Programmers Did.
I'm sure of that, regardless of how true it actually may be (spoiler:
not remotely true). Do doctors make the worst patients? Do
programmers make the worst IDE users? Hm.
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.