Programmers editor with...?
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Programmers editor with...?
Why can't you use the functionlist feature in Notepad++? The search box can search any function name instantly.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
I want to open notepad++ positioned exactly at a specific procedure name, without needing to do a manual search operation.Rathinagiri wrote:Why can't you use the functionlist feature in Notepad++? The search box can search any function name instantly.
This is perfectly done using the batch file posted by Tiger.
I'm simply exploring the possibility to get the line number for a search expression at Harbour level to avoid the batch file.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Programmers editor with...?
Well, it depends on your definition of "faster"Roberto Lopez wrote: Is there any way to do that in Harbour faster?
TIA
Please try the code below to see if it's fast enough, for your needs.
Code: Select all
PROCEDURE Main()
LOCAL cSearchFor := "2009-02-14 13:25 UTC+0100"
LOCAL aLines := hb_ATokens( MemoRead( "C:\Harbour\ChangeLog.txt" ), .T. )
? Len( aLines )
// CASE SENSITIVE
AEVal( aLines, {|e,n| Iif( cSearchFor $ e, hb_Alert( cSearchFor + " found in line: "+hb_ntos( n ) ), NIL )} )
// CASE INSENSITIVE
// AEVal( aLines, {|e,n| Iif( hb_AtI( cSearchFor, e) > 0, hb_Alert( cSearchFor + " found in line: " + hb_ntos( n ) ), NIL )} )
wait
RETURN
regards,
---
Pete
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Some of my sources are very large (around 2mb size) but significally smaller than Chengelog... so... it should work...PeteWG wrote:Well, it depends on your definition of "faster"Roberto Lopez wrote: Is there any way to do that in Harbour faster?
TIA
Please try the code below to see if it's fast enough, for your needs.
<...>
I suppose that harbour's <Changelog.txt> is a decently large file. Don't know if your .prg exceeds that size!
regards,
---
Pete
Thanks!... I'll try it.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Pete,
It works amazingly fast. I'm using it to search for a procedure name inside about 600 prg files (6 MB of source code) and it is nearly instantaneous.
Since I need the line number, I've used chr(13) as delimiter in hb_ATokens().
Thanks again.
It works amazingly fast. I'm using it to search for a procedure name inside about 600 prg files (6 MB of source code) and it is nearly instantaneous.
Since I need the line number, I've used chr(13) as delimiter in hb_ATokens().
Thanks again.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Programmers editor with...?
Glad to see it worked for you!Roberto Lopez wrote:Pete,
It works amazingly fast. I'm using it to search for a procedure name inside about 600 prg files (6 MB of source code) and it is nearly instantaneous.
Since I need the line number, I've used chr(13) as delimiter in hb_ATokens().
No surprise about speed.
Harbour is indeed amazingly fast for its genre (p-code languages/compilers),
just taking a closer look into the plethora of functions (particularly the hb_* family),
is usually enough to reveal all the tremendous power it offers the users.
rather I myself should say thanks to you for "inventing" minigui!Roberto Lopez wrote:Thanks again.
regards,
---
Pete
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
Yes, but, sadly, those functions, are not fully docummented and there is no so much usage examples... the only way to go, is to dig on the changelog and Harbour sources...PeteWG wrote: <...>
Harbour is indeed amazingly fast for its genre (p-code languages/compilers),
just taking a closer look into the plethora of functions (particularly the hb_* family),
is usually enough to reveal all the tremendous power it offers the users.
<...>
Some of tthese functions certainly deserves a wrapper with a more friendly name and basic code samples.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Programmers editor with...?
Oh yes, documentation! an everlasting request (and a constant chance for whining ) of all Harbour users.Roberto Lopez wrote: Yes, but, sadly, those functions, are not fully docummented and there is no so much usage examples... the only way to go, is to dig on the changelog and Harbour sources...
I'd say that the documentation (or rather the lack of it) it's the Achilles' heel of nearly any open source software.
I was struggling with this problem from when I started using harbour.
However, seems that things have somehow improved in this field.
Some very knowledgeable guys out there, have created some quite good pieces of Harbour documentation.
And then, some time ago, I thought to gather all those good docs that I had found and create a wiki
at GitHub (initially motivated from an original idea by Juan Gamero).
Basically, it's a kind of a "dictionary" (or try to be, anyway ) of Harbour functions with a short description and syntax.
Since it is a work on progress, it certainly is not complete, but I can say it somehow helps as reference.
In the hope it might be useful for you or anyone interested, here is the the link.
And if you'll be there, don't miss to take a look at references, for links of sites with valuable docs.
regards,
---
Pete
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Programmers editor with...?
Thanks Pete. Really a treasure to ponder!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Programmers editor with...?
There is some 'jewels' there, like:PeteWG wrote: <...>
In the hope it might be useful for you or anyone interested, here is the the link.
And if you'll be there, don't miss to take a look at references, for links of sites with valuable docs.
Code: Select all
hb_ADel(<aArray> [, <nPos>, <lAutoSize>])
Thanks!... This is wonderful.. maybe this links should be added to HMG reference (Claudio, Rathi... what do you think?).
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)