Page 2 of 3

Re: Curve smoothing

Posted: Mon Oct 14, 2024 11:02 pm
by Andrew
dilwyn wrote: Mon Oct 14, 2024 10:14 pm Running it on QPC2 I get the error

At line 1310:3 assignment can only be to a variable or array element

That statement is qx = xc-xd, the only thing I can think of is that QX is a clashing command name in a QLiberator toolkit extension?

Certainly, if I run t on a "clean" QPC2 (i.e. no extensions loaded), it works OK.
I get a similar error for variable PW - it conflicts with a name from ProWes. I renamed it to PWW.
I think it's impossible to prevent all clashing situations.

Re: Curve smoothing

Posted: Tue Oct 15, 2024 7:51 am
by stevepoole
Thanks Andrew, problem noted and corrected ready for the next version. Steve.

____________________

Re: Curve smoothing

Posted: Tue Oct 15, 2024 8:59 am
by dilwyn
I agree with Andrew that short of looking up names in a gigantic list of names used as keyword names (and there is such a list on my site) it's probably impossible to avoid sometimes.

I'd arrived home later than I expected last night after attending a meeting, and was a bit too tired to start debugging. I was glad that Steve confirmed what I said and even went as far as saying which lines needed to be changed.

A utility like the QFIND function in the QREF utilities is so useful when amending things like this. I use it all the time - find the first instance of the variable to rename with ED QFIND('name_to_change') , amend that name by hand, and ED QFIND repeatedly to find all other instances.

Re: Curve smoothing

Posted: Tue Oct 15, 2024 6:20 pm
by Cristian
stevepoole wrote: Mon Oct 14, 2024 9:26 pm Hi Cristian,

This error may be a name-table problem. What system are you using ?

The program has run for a week under QPC2, with randomised data, tested ok... Steve.
__________________
128K QL, JS ROM, Toolkit2 (Qemulator)

Re: Curve smoothing

Posted: Tue Oct 15, 2024 9:56 pm
by stevepoole
Hi Cristian,

Insert the line 685 ax=t(a,x): ay=t(a,y) which should cure that particular problem.

However on my SGC, under QDOS, there is a problem with an ASIN(ry/h) overflowing.

A fixed QDOS version will follow soon.... Steve.

_______________________________________

Re: Curve smoothing

Posted: Wed Oct 16, 2024 6:15 pm
by Cristian
Thank you Steve, now it works!

Re: Curve smoothing

Posted: Tue Oct 22, 2024 9:13 pm
by stevepoole
Hi QDOS Users,
Here is ContourDemo3_bas, which has been tested OK under QDOS, on my SGC, for 24 hours with random data.

I had to include line 2000, to avoid a QDOS ASIN(1) bug that halted the program, if '1.00000001' occured as entry parameter.

( This bug never occurred under SMSQ/E, neither with QPC, nor with SGC ). The cause was my fudge to avoid divisions by zero !

I hope to improve the graphics output still further, as three points on a straight line have infinite curvature, and are fudged too...

Just UNZIP & LRUN. Please report any other quirks you may detect.... Regards, Steve.
ContourDemo3.zip
(4.55 KiB) Downloaded 124 times

Re: Curve smoothing

Posted: Sat Oct 26, 2024 11:33 am
by mhanias
I wonder if the plots can be transferred to Easel.

Re: Curve smoothing

Posted: Sun Oct 27, 2024 7:54 am
by stevepoole
Hi Mhanias,

The QL user guide, 'QL Information' section, page 6/84 contains information about Import/Export of data to the Psion suite (excel etc).

It is possible to export Psion data to Superbasic programs, providing row and column headings etc are catered for, (see the Psion format).

A suitable procedure for importing excel data to the Curve-smoothing program is perfectly realisable....

But it does not allow Excel to include Superbasic programs,, written using the interpreter. (The 'curve' program is quite lengthy).

I hope this helps ? Regards, Steve.

Re: Curve smoothing

Posted: Sun Nov 03, 2024 8:59 pm
by Tinyfpga
Just UNZIP & LRUN. Please report any other quirks you may detect.... Regards, Steve.
From my perspective it is quite quirky, but that is because I use SMSQE at high resolutions and thus need programs that are moveable within its extended environment.
The program LRUNs on my SMSQE setup, but does not execute as an SBASIC job. It will not compile using QLiberator with or without line numbers.
I like the program and felt it was worth modifying it to be moveable and compilable without line numbers. The most difficult bit (for me) was eliminating the program's GOTOs. The result was a compiled moveable program that might be used to create animated wire frame images, if only I could understand how it works. As you say "the program is quite lengthy".
The really quirky thing ,now, is that with GOTO's eliminate the code cannot be interpreted but works perfectly when compiled. If interpreted it fails with the error:- "At line 2160:1 Return not in procedure or function"
I post a container file with copies of the modified code for the Contour program with and without dots. I tried to modify the original as little as possible.
contour 6.jpg
contour 7.jpg
Win3.zip
(473.42 KiB) Downloaded 91 times