[fpc-pascal]The state of FPC (was: Synapse for FPC)

Matt Emson memsom at interalpha.co.uk
Thu Jul 24 15:48:27 CEST 2003


> I need some some functions. What I need for use this function? i must
> know unit where this function is. (for adding it into uses)
>
> On Borland, i do simple text seach on Borland sources and directly I
> can see what unit I must use.
>
> But on FPC I gen only some include unit. I must do search again..
> again... for getting unit name what I need. ;-(

This is what I was saying to Michael. The FPC team may thing the unit
structure with include files is good, but I for one look at the source code
*before* I look at the docs, because 80 - 90% of the time I find this more
productive. FPC makes this very hard.

Lukas - I think grep is your best friend with FPC. You need to find the
function 'GetXXX' but don't know where it it - I usually grep for it (using
Cygwin on Windows.) If you're not familiure with grep, some thing like:

grep -r [Gg][Ee][Tt][Xx][Xx][Xx] c:\fpc\units > output.txt

will generate you a list of all places it exists, recursively. The regular
expression syntax I use is one of brute force rather than anything else and
[Gg]etXXX would probably work too, so long as the case is consistent. You
can probably do case insensetive searches too, I've never really looked into
it myself.

A good tutorial is at: http://pegasus.rutgers.edu/~elflord/unix/grep.html

I'm not going to comment any more on this issue except to say that it *is*
an issue.

Michael - if none of your developers look at the Delphi source code, I
shudder to think at the standard of programming they produce. I've never met
a professional programmer who doesn't at least look at headers/interface
sections of code to understand how a routine works. Not doing so is
completely alien to the way I work normally, and I am not alone in this
either.

Matt






More information about the fpc-pascal mailing list