[fpc-pascal] About FPC calling register like Delphi

Alexandre Leclerc alexandre.leclerc at gmail.com
Thu Jan 25 20:00:12 CET 2007


2007/1/25, Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>:
> On 1/25/07, Alexandre Leclerc <alexandre.leclerc at gmail.com> wrote:
> > Yes, I understand that, but I *need* a scripting engine which is based
> > on Pascal. And ROPS is the only one I found that answered my
> > requirements. Also, it's integrated and it's "free", and very fast.
> >
> > If there was another way, I would use it. But since, I must rely on a
> > stable FPC internal to make it work.
>
> Does this script support other calling conventions?
>
> You could try using stdcall instead of register. It´s much simpler,
> and as stable as it can get.
>
> I remember writing a simple script engine myself, and then I choose to
> support mostly stdcall.

ROPS (RemObjects Pascal Script remobjects.com) is 100% pascal code
that you simply use in your own code. The engine compiles in your
application. It then work with the application stack, etc. to execute
native pascal functions and script functions. Quite a nice script
engine.

It works 100% with Delphi, but with FPC since the parameters are not
the same order in the stactk, this causes issues. Right now I use the
near 1 year old revision 3823 of FPC and it works ok for that
revision. But after that it is not again. But I did not wanted to
invest efforts to fix that before param-stack order is more 'stable'
in FPC. Because I would have to work on it again later.

-- 
Alexandre Leclerc



More information about the fpc-pascal mailing list