Author Topic: Lazarus interface to Rexx / ooRexx  (Read 410 times)

mdlueck

  • Full Member
  • ***
  • Posts: 112
  • Objective: Cross-platform robust GUI front-end
    • Lueck Data Systems
Lazarus interface to Rexx / ooRexx
« on: July 13, 2026, 04:36:00 pm »
Greetings,

I find that apparently there is some level of integration between Free Pascal and the Rexx scripting language. See:

https://wiki.freepascal.org/REXX

On the Open Object Rexx (ooRexx) side, there exists a bridge between Java Bean Scripting Framework (BSF) and ooRexx - BSF4ooRexx. That allows for calls from either source language to the other language, as well as I believe variables / data to remain in memory longer than just a single call.

So questions to the Lazarus community:

1) Does Free Pascal / Lazarus have integration already to Java BSF? If so, I would seek to link Lazarus to BSF4ooRexx.

2) Anyone know what this already existing interface is between Pascal and Rexx? Is what has already been developed compatible with the latest ooRexx?

3) Setting aside the newly found Pascal REXX interface... (if that is not suitable to interface to the latest ooRexx) may I be pointed in the direction of how to interface to a C/C++ API from Pascal? The ooRexx API I would seek to interface with is:

https://www.oorexx.org/docs/pdf/rexxapi.pdf

2.3.3. The RexxStart Function

RexxStart calls the Rexx interpreter to run a Rexx procedure.
retc = RexxStart(ArgCount, ArgList, ProgramName, Instore, EnvName,
CallType, Exits, ReturnCode, Result);


I am thankful,
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: Lazarus interface to Rexx / ooRexx
« Reply #1 on: July 13, 2026, 05:10:10 pm »
Using GIT, the rexx package in FPC sources hasn't been significantly updated since 2008. I somehow doubt it is up to date.

The package mentions that it uses a "Rexx SAA" interface, and is about 800 lines, which isn't much.

mdlueck

  • Full Member
  • ***
  • Posts: 112
  • Objective: Cross-platform robust GUI front-end
    • Lueck Data Systems
Re: Lazarus interface to Rexx / ooRexx
« Reply #2 on: July 13, 2026, 06:17:45 pm »
Greetings marcov,

Yes I see it actually was part of the recent installation I did of Lazarus 4.6 to Xubuntu 26.04!

I will try to do a "Hello, World!" GUI program interfacing to ooRexx via that Rexx SAA interface package. The example program appears to be console / text based Pascal. I want to see GUI Lazarus able to interface to ooRexx.  8-)

What about Pascal interfacing to Java Bean Scripting Framework (BSF)?

I am thankful,
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Thaddy

  • Hero Member
  • *****
  • Posts: 19633
  • Glad to be alive.
Re: Lazarus interface to Rexx / ooRexx
« Reply #3 on: July 13, 2026, 07:34:26 pm »
If you use the jvm target, that would be no problem.
Any "programmer" that knows only one programming language is not a programmer

mdlueck

  • Full Member
  • ***
  • Posts: 112
  • Objective: Cross-platform robust GUI front-end
    • Lueck Data Systems
Re: Lazarus interface to Rexx / ooRexx
« Reply #4 on: July 13, 2026, 09:52:18 pm »
Greetings Thaddy

If you use the jvm target, that would be no problem.

No.... I envision normal native Linux or Windows executable code, that itself can interact with Java BSF... and from there could reach ooRexx via BSF4ooRexx.  8-)

So I am specifically asking if Lazarus on its own has a framework to connect over to Java BSF.

The BSF4ooRexx is far more capable than legacy SAA RexxStart API. (But I am eager to see at least Lazarus successfully talking to the latest ooRexx via SAA RexxStart, do not misunderstand me... that itself will be huge.)

I am thankful,
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Thaddy

  • Hero Member
  • *****
  • Posts: 19633
  • Glad to be alive.
Re: Lazarus interface to Rexx / ooRexx
« Reply #5 on: July 15, 2026, 12:38:10 pm »
Then use JNI.
Any "programmer" that knows only one programming language is not a programmer

 

TinyPortal © 2005-2018