$$external problem

Anything QL Software or Programming Related.
User avatar
Peter
QL Wafer Drive
Posts: 1953
Joined: Sat Jan 22, 2011 8:47 am

Re: $$external problem

Post by Peter »

EmmBee wrote:
Peter wrote:
EmmBee wrote:You need to do your tests on a real QL or Q-emuLator, and you will get the expected answers.
Unfortunately, these QLIB externals will not currently work with QPC2.
What is the technical reason for this?
The trouble is apparently caused by QPC2 not recognizing it has been called from the Interpreter's #0.
The code will work if called from another compiled SBASIC Qliberator job, I've just tried this.
So, these QLIB externals do actually work with QPC2, but they currently cannot be used in Interpreted SBASIC.
To me this sounds more like an SMSQ/E than a QPC2 issue. Which OS did you use under Q-emuLator?


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: $$external problem

Post by Giorgio Garabello »

EmmBee wrote:
Peter wrote:
EmmBee wrote:You need to do your tests on a real QL or Q-emuLator, and you will get the expected answers.
Unfortunately, these QLIB externals will not currently work with QPC2.
What is the technical reason for this?
The trouble is apparently caused by QPC2 not recognizing it has been called from the Interpreter's #0.
The code will work if called from another compiled SBASIC Qliberator job, I've just tried this.
So, these QLIB externals do actually work with QPC2, but they currently cannot be used in Interpreted SBASIC.

EmmBee
So, can be used by an another SBASC compiled program?


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: $$external problem

Post by Derek_Stewart »

Hi,

I loaded up Q-emulator with Minerva v1.98 and entered the examples in the Qliberator Manual on Page 75.

The compiled programmes: SQUARE_obj, FRA_obj, were LRESPRed on the Minerva v1.98 and worked as expected.

I tried LRESPRing the compiled programmes in SMSQmulator, which gave the same problem as QPC2. Clearly a SMSQ/E problem.

Maybe this should be reported to Wolfgang Lenerz.


Regards,

Derek
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: $$external problem

Post by Giorgio Garabello »

Derek_Stewart wrote:Hi,

Maybe this should be reported to Wolfgang Lenerz.
mmmmm my english is not so good.
Can you do this for me, please?

Giorgio


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: $$external problem

Post by Derek_Stewart »

Hi,

I have sent Wolfgang a message with the problems with regards to the Qliberator External compiling.

I think this needs to be fixed, as it is one of the main feature which made me buy QLiberator in 1994.


Regards,

Derek
User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: $$external problem

Post by Giorgio Garabello »

Derek_Stewart wrote:Hi,

I have sent Wolfgang a message with the problems with regards to the Qliberator External compiling.

I think this needs to be fixed, as it is one of the main feature which made me buy QLiberator in 1994.
Thanks!!!


User avatar
Artificer
Brittle Membrane
Posts: 120
Joined: Fri Nov 24, 2017 8:43 am

Re: $$external problem

Post by Artificer »

Hi

Sorry to have come to this thread late and have just tried the demonstration program for FRA(), compiled with QLiberator and LRESPRed and I get it to work when compiled with smsq/e 3.31 or with smsq/e 3.32 on a Q60. I have also QLiberated this demo program on my Aurora system, smsq/e 3.32 mode 4 and it works there as well as an SBasic function FRA(). Has anyone else tried QL hardware with this problem, could still it be due to an emulation issue?

Cheers


User avatar
Giorgio Garabello
Gold Card
Posts: 277
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, Italy
Contact:

Re: $$external problem

Post by Giorgio Garabello »

Problem solved. Replacing QLIB_RUN with QLIB_RUN_mod336 works perfectly.
Who knows why?

Giorgio


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: $$external problem

Post by pjw »

Giorgio Garabello wrote:Problem solved. Replacing QLIB_RUN with QLIB_RUN_mod336 works perfectly.
Who knows why?
Somebody did: I found a program called QLib_run_bas. This is the program that creates the patch, and this is what it has to say about the matter:

Code: Select all

100 REMark - This patch allows QLiberator externals to be used with SBASIC Job 0
110 REMark - There seems a possibility of having externals work with SBASIC
120 REMark - daughter Jobs but not only does QLiberator (at least up to V3.36)
130 REMark - assume that all Jobs other than Job 0 are compiled, the external
140 REMark - procedures fetch their parameters from Job 0 regardless of the
150 REMark - calling job. This patch tries to correct that.
It may have been done by Thierry - ?


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: $$external problem

Post by dilwyn »

There were two BASIC programs included with original SMSQ/Es - QLIB_RUN_bas and Qlibrun_bas, which I think is where the one Per mentioned came from, so might have been by Tony Tebby.

The SMSQ/E manual states:
QLiberators EXTERNals do not work
If you have compiled own porcedures (sic.) and functions using QLiberator, which you want to load using LRESPR, then you have to patch QLIB_RUN and QLIB_obj first to make them work. You will find two BASIC programs with the same name which will do this for you. You should also patch files with already inbuilt EXTERNals.


Post Reply