[fpc-pascal] Importing units

Kevin Lyda kevin at lyda.ie
Wed Jun 18 22:20:20 CEST 2025


tl;dr How do I package reusable units for others?

Back in 1988/89, I took a computer science class in high school. Yes,
we lacked fire back then, but we had a compiler so that was fine.
Specifically a Turbo Pascal 3.0 compiler.

I had a bunch of fun writing code in it and even though pascal never
appeared again in my software engineering career, I always thought it
would be fun to work in again. And I have some time now and I came up
with a project to work on in Object Pascal.

You folks have made a great compiler and an amazing std library. In
the process of my project, I'm likely going to make some units that
will be useful for others. I'd like to do them in a way that makes
that easy.

I've been doing a bunch of Go the past several years. It's pretty fun
and one useful thing is that you can do "go get
some.site/some/path/go-units" and then you can use modules from there.
You could do something like that for free pascal with git submodules.
Not exactly the same thing, but close. Is that what people do?  Or is
there a better way to provide units for others to use?

Thanks for any guidance,

Kevin


More information about the fpc-pascal mailing list