[fpc-pascal] Error on live.feepascal.org...

Michael Van Canneyt michael at freepascal.org
Thu Nov 19 09:36:35 CET 2026



On Wed, 18 Nov 2026, Gene Buckle via fpc-pascal wrote:

> I wrote a quick line to see how big a smallint is:
>
> program main;
>
> {$mode objfpc}
> uses browserconsole;  // For output in correct console panel...
>
> begin
>   Writeln('shortint is ', SizeOf(shortint), ' bytes.');
> end.
>
> Compiling results in this error:
>
> tmp/main.pp(8,27) Error: identifier not found "SizeOf"
>
> Compiling the same program (sans the browserconsole unit) works as expected.

That's expected, since the pas2js compiler is emitting Javascript, and
javascript types/variables do not have a size. Consequently, pas2js does not
recognize any SizeOf/Offset etc. intrinsics.

I'm still working on having the actual FPC compiler as a backend, which
would emit WebAssembly, and then it would work.

Michael.


More information about the fpc-pascal mailing list