[fpc-pascal] A better way?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Apr 15 10:24:05 CEST 2016


On 2016-04-15 07:15, Ryan Joseph wrote:
> Sure you could put those all in file for this example but in the real
> world there may be dozens of TClassB subclasses which would make the
> unit 10,000’s of lines long and impossible to navigate.

Big units have never been a problem to navigate for me. Years ago I've
implemented the "procedure list" IDE add-on for Lazarus and Maximus. I
can find locations in code in one or two seconds (however fast I can
type). Procedure List (Alt+G) is now installed as standard with Lazarus IDE.

Use bookmarks to jump between often used locations.

Lazarus IDE includes a feature called Code Explorer, but I find
Procedure List much faster.


> The other
> solution as mentioned would be to use $includes and still use the
> single unit approach (how reliable is this? I’ve never tried).

Yes, include files work very well (much better than in Delphi). Lazarus
IDE knows how to handle include files very well to. So too does MSEide,
but Lazarus has a few more tricks.

The Free Pascal code (compiler and RTL) uses include files extensively.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list