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

2022-04-24 Thread Jonas Maebe via fpc-pascal

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.



Jonsa
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


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

2022-04-24 Thread Виктор Матузенко via fpc-pascal
The test program:

begin
  {$IF Declared(Leave)} Leave; {$ENDIF}
end.





The compilation error:


D:\data\temp>fpc -Mfpc leave_example.pas
 Free Pascal Compiler
version 3.2.1 [2021/02/01] for i386
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling leave_example.pas
leave_example.pas(2,30) Error: Identifier not found "Leave"
leave_example.pas(4) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: D:\prog\FPC\fixes_3_2\bin\i386-Win32\ppc386.exe returned an
error exitcode







What's happening?


-- 
Victor Matuzenko (Виктор Матузенко)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal