Recent

Author Topic: Using 6.0 Pascal programms in FPC 3.2.2  (Read 780 times)

Wilber

  • Newbie
  • Posts: 1
Using 6.0 Pascal programms in FPC 3.2.2
« on: February 29, 2024, 02:43:39 pm »
I am new in FPC programming.
I have Pascal 6.0 programms and want to use them in FPC.

OS: Windows 11
FPC-Version: 3.2.2

Which options shoud I use?

I have compiled the programms. No errors.
But by "Run" the run-time error occured: "exited with exitcode = 100"

Simple programms work, but programms with file function do not always.

Under "uses" I set "crt".

Can you help me? Thanks.

Wilfried



marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11944
  • FPC developer.
Re: Using 6.0 Pascal programms in FPC 3.2.2
« Reply #1 on: February 29, 2024, 02:45:38 pm »
Exited with exitcode= 100 means that the program returned "100" as result. It is not the same as a runtime error.

Clean programs will run unmodified, except in rare cases there are some issues because you made a 30 year jump in operating systems.

If your code is not clean and straightforward, it requires updating/porting.

Without code or specific problems there is not much we can do.

Thaddy

  • Hero Member
  • *****
  • Posts: 16194
  • Censorship about opinions does not belong here.
Re: Using 6.0 Pascal programms in FPC 3.2.2
« Reply #2 on: February 29, 2024, 09:29:16 pm »
I would do two things:
- Compile with {$mode TP}, because the default for fpc is {$mode fpc} and that has some differences.
You can also do that from the commandline using fpc -Mtp <your code>
- Check if 100 is really set in the code. If it is not in your code it means that you have a Disk read error. See: https://www.freepascal.org/docs-html/current/user/userap4.html#x191-198000D
Those are the same numbers as TP6.0 maps to, with - close to - the same error string.

Otherwise we need to see the code.

(And there are quite a few seasoned TP users, including me and probably Marco, on this forum so you will get a correct answer )

I have TP1, TP3 and TP5.5 running in a dosbox to compare such issues against FPC's TP mode.
« Last Edit: February 29, 2024, 09:47:31 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018