[fpc-pascal] What's in Hello World
Jonas Maebe
jonas at freepascal.org
Sun Jan 7 13:33:00 CET 2024
On 07/01/2024 13:21, Ingemar Ragnemalm via fpc-pascal wrote:
> Just for comparison, I fired up Think Pascal and made Hello world!
>
> Plain Hello world, closes so quickly that you don't have time to see it:
> 4625 bytes.
>
> Including ShowText and while not Button do; 4639 bytes.
>
> Yes, less than 5k! Progress?
You forgot the 1MB Mac ROM :)
That's also the main difference between C and FPC: C programs by default
are dynamically linked, so all of the standard RTL functionality that
gets linked into an FPC program is not there in a C program most of the
time.
It's also why golang programs are larger: those are statically linked as
well.
Jonas
More information about the fpc-pascal
mailing list