Search Window : "Find Objects"

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Search Window : "Find Objects"

Postby PhilGray on Mon Sep 27, 2010 9:44 am

Just wondering whether it would be "easy" to improve the "Advanced"-Tab by adding an "AND" option ? .. or does this already exist somewhere else ( without writing one's own APL search-function ) ?

e.g.
Containing Text : '∆∆TEXT∆SYS'
AND : '⎕WC'
Option : in the same line of code (Y/N)

TIA
PhilGray
 
Posts: 50
Joined: Sat Mar 13, 2010 7:55 pm

Re: Search Window : "Find Objects"

Postby DanB|Dyalog on Mon Sep 27, 2010 5:57 pm

That facility does not exist at the present.
There is however already a user command to do something similar (no need to code your own).
It supports regular expressions so you could do smething like

]wsloc ∆whatever∆.*?⎕WC -pattern

where -pattern makes the command interpret the ".*?" as "any sequence of characters" effectively looking for "∆whatever∆" followed by 'anything' followed by "⎕WC". Without -pattern WSLOC (WS LOCate) will look for an exact match.
This requires that you know a bit about regular expression but it is very powerful.
As a bonus it will show you the lines where the match is found.
The command also supports a number of switches to exclude comments, text, even code itself in case you want to search comments or text instead.
Have a look at
]?wsloc
for details.

User commands are in 12.1 but if you are using 11 or 12 this command exists in Spice (which is user commands before the ] syntax was introduced).
DanB|Dyalog
 

Re: Search Window : "Find Objects"

Postby PhilGray on Mon Sep 27, 2010 6:35 pm

Thanks Dan .. I'll get started.
PhilGray
 
Posts: 50
Joined: Sat Mar 13, 2010 7:55 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest