HP3000-L Archives

October 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"F. Alfredo Rego" <[log in to unmask]>
Reply To:
F. Alfredo Rego
Date:
Sat, 13 Oct 2001 09:11:55 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (156 lines)
Jim Phillips <[log in to unmask]> wrote:

><[log in to unmask]> proposes:
>
>>  Cntl+F (find).
>>
>>  Wirt Atmar
>>
>  > PS: This answer isn't as smart-alecky as it seems. The Find function allows
>  > you to very quickly answer these sorts of questions, especially
>when combined
>>  with the Cntl+P (print to paper) function.
>
>Well, to be sure, that will work.  It's only that when I am in a few hundred
>line procedure and I have to "page-up" forty times to find the procedure
>name and by then I've forgotten what I was looking for anyway....

Not to mention a "few THOUSAND" line procedure.

Try Qedit from Robelle (http://www.robelle.com/products/qedit/)

Here is an example using a program written in SPLAsh (the native-mode SPL
compiler from Allegro (http://www.allegro.com/products/hp3000/splash.html).
This is the program that I happen to be editing right now.

For your convenience, I have inserted blank lines and comments ("<======").

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

:run qedit.pub.robelle

Qedit/iX. Copyright Robelle Solutions Technology Inc. 1977-2001 Type ? for Help
(Version 5.1)
Licensee:  Adager [11N]

/o mdrename.source3                         <======  Open a file
Open MDRENAME.SOURCE3.REGO Current = 2315

/v o                                        <======  Get info on the file
                                                      (notice: 2315 lines)

Open: MDRENAME.SOURCE3.REGO,Defer  SPL Length:72 Margins:1/72 Dirty
Lines:2315 Blocks:180 Free:221 L*:2315


/l 'BadPointer1'                            <======  List lines with
'BadPointer1'
   669       BadPointer1,
   869     BadCount := BadPointer1 := BadPointer2 := false;
  1221             BadPointer1 := true;
  1327         if BadPointer1 then report (BadPointer1);
  1354             BadPointer1 := true;
  1376             BadPointer1 := true;
  1415                 BadPointer1 := true;
  1817         if BadPointer1 then report (BadPointer1);
/



I can turn "totals" on, so Qedit reports HOW many lines qualify:

/set totals on

/b                <=== "b' means "before" ("redo").
l 'BadPointer1'   <=== Qedit allows me to edit the "command to be redone"
                        (I just pressed "return" to execute it unchanged).

   669       BadPointer1,
   869     BadCount := BadPointer1 := BadPointer2 := false;
  1221             BadPointer1 := true;
  1327         if BadPointer1 then report (BadPointer1);
  1354             BadPointer1 := true;
  1376             BadPointer1 := true;
  1415                 BadPointer1 := true;
  1817         if BadPointer1 then report (BadPointer1);
8 lines found                   <====  Nice total (this is particularly helpful
                                        when hundreds of lines qualify).



Naturally, Qedit also allows you to "find" each line, if you so prefer:

/1    <====  Place yourself at line number 1, the beginning of the file.
     1     ! 01.10122330 mdrename.source3  nm module -o mdrename.orego


/f    <==== If you don't specify the string that you want to find, Qedit
             uses the last string that you specified.  This is VERY nice!

   669       BadPointer1,
/f
   869     BadCount := BadPointer1 := BadPointer2 := false;
/f
  1221             BadPointer1 := true;
/f
  1327         if BadPointer1 then report (BadPointer1);
/f
  1354             BadPointer1 := true;
/f
  1376             BadPointer1 := true;
/f
  1415                 BadPointer1 := true;
/f
  1817         if BadPointer1 then report (BadPointer1);
/f
  Warning: No Line
Error: End of File
/


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


Please note that this example is oriented towards your specific needs, as
stated in your posts to hp3000-L.  This example uses "single-line command"
mode.  Qedit also has VISUAL modes (both in host-based mode and in "Qedit
for Windows" mode) which allow you to get page-oriented views into your
file.

If you like to think in terms of relational database theory, you will
notice that Qedit's "list" command is analogous to SQL's "select" command.

A powerful editor which I use on the Mac (BBEdit, from BareBones Software
http://www.barebones.com/products/bbedit.html) has a "find all" command
that is comparable to Qedit's "list" command.  I am not familiar with
editors under Windows, but I would assume that, by now, they would have
copied BBEdit's technology :-)

The problem with any GUI-oriented editor is that you must follow a bunch
of steps to do things that you can do with just a couple of keystrokes
within Qedit's command-line interface (which, again, is just ONE of the
several interface choices that Qedit offers you).

Qedit is unbelievably powerful and adaptable.  Through the years, I have
developed quite a bag of tricks.  Luckily, the Robelle folks *DO* listen
to my periodic suggestions and they have provided lots of useful
enhancements that have made my life a lot simpler.


Happy editing,

   _______________
  |               |
  |               |
  |            r  |  Alfredo                     [log in to unmask]
  |          e    |                           http://www.adager.com
  |        g      |  F. Alfredo Rego
  |      a        |  Manager, R & D Labs
  |    d          |  Adager Corporation
  |  A            |  Sun Valley, Idaho 83353-3000            U.S.A.
  |               |
  |_______________|

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2