[fpc-pascal] Permuted index (KWIC) of function descriptions

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Wed Jan 26 14:36:09 CET 2011


michael.vancanneyt at wisa.be wrote:
> On Wed, 26 Jan 2011, Mark Morgan Lloyd wrote:
> 
>> As a comparative beginner, I still find myself stumbling across RTL 
>> functions that I've previously hand-coded.
>>
>> Is there an easy way of generating a complete permuted index from the 
>> one-line descriptions of the functions in the RTL (and optionally FCL 
>> and LCL)?
> 
> Shortly said: no.
> 
>>
>> For example, can I rapidly get all function descriptions with "space" 
>> as part of the description, which could subsequently be filtered (e.g. 
>> if I were interested in text operations I could quickly ignore 
>> anything with "file" in the description)?
>>
>> Copy2Space     Returns              first space character
>> Copy2SpaceDel  Deletes              first space character
>> DelSpace       Delete                   a space from
>> DelSpace1      Reduces                 of space characters
>> DelSpace1      Reduces                  1 space character
>> IntToBin       Converts         inserting spaces at
>> IsEmptyStr     Check     disregaring whitespace characters
>>
>> That's somewhat abbreviated so that it's not screwed too badly by wrap.
> 
> Creating such an index requires additional keywords, which are simply not
> present now.

Even looked at superficially gives useful partial results:

fpcdocs$ grep -r -B 1 '<short>' *

I'm sure that somebody familiar with XML (which I'm afraid doesn't 
include me) could knock out something half-way decent in a few minutes.

Or is the problem actually XML in this case, i.e. it's obvious that we 
want to extract the short description but that leaves an uncertain context?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list