[fpc-pascal] What's wrong with Leave?

Jonas Maebe jonas at freepascal.org
Sun Apr 24 16:02:47 CEST 2022

On 24/04/2022 15:30, Виктор Матузенко via fpc-pascal wrote:
> The test program:
> begin
>    {$IF Declared(Leave)} Leave; {$ENDIF}
> end.

"Leave" is declared as an intrinsic in the system unit because in MacPas 
mode it means the same as "break" in UCSD-derivates.

We don't have support in the compiler for declaring intrinsics in units 
other than the system unit (so we can't declare it in the macpas unit 
instead), and we don't have a different system unit for each supported 
syntax mode either (otherwise it would not be possible to mix units 
compiled in different syntax modes in a single program), which is why 
you see this behaviour.


More information about the fpc-pascal mailing list