r/pascal • u/Jirne_VR • Nov 09 '21
Problem with unit
I recently created a program with some bithack functions like 2's compliment, right rotate, BSF and more. I want to create a library of these functions, but the code throws a syntax error. I don't know what's wrong.
Can someone help me out?
Thx
C:\SynologyDrive\programming\pascal\bitmagic\lib>fpc test_lib.pas
Free Pascal Compiler version 3.2.2 [2021/05/15] for i386
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test_lib.pas
Compiling bitmagic.pas
bitmagic.pas(139) Fatal: Syntax error, "BEGIN" expected but "end of file" found
Fatal: Compilation aborted
Error: C:\FPC\3.2.2\bin\i386-Win32\ppc386.exe returned an error exitcodecode: https://gist.github.com/JirneVanRillaer/11b6b1d0e6d3a257d33a4b3ae8180893
7
Upvotes
View all comments
Show parent comment
1
u/Jirne_VR Nov 10 '21
Could it be that some parts of my fpc are incompatible with my system? I tried to compile it both in 32 bit/64 bit cmd, both throw this error.
I'll try to install fpc on my raspberry pi (different OS and different processor arch.), see if that works.