Page 1 sur 1

Problem with examples from Help

Publié : mer. oct. 01, 2025 6:12 am
par GermanXG
I get an strange error doing this:

1) Launch Xcas
2) Add a 2D geometry entry
3) Launch Help panel
4) Search command "segment"
5) Select example "segment(point(i),point(1+i),A,B)" and execute it.
6) Launch Help panel
7) Search command "line"
8.) Select example "line(1+i,slope=2)" and execute it.
9) Now remove the line of the previous example (select it and backspace).
10) An error and a warning appears in the output of the first example. And you can't execute it again.

I'm using the latest release. Is this a bug? Or maybe my configuration?
Thanks

Re: Problem with examples from Help

Publié : jeu. oct. 02, 2025 8:20 am
par parisse
Are you on MacOS, Windows or Linux?

Re: Problem with examples from Help

Publié : jeu. oct. 02, 2025 6:43 pm
par GermanXG
Linux, PCLinux OS distro

Re: Problem with examples from Help

Publié : ven. oct. 03, 2025 1:37 pm
par parisse
I'm unable to reproduce this issue on debian with giac 2.0.0-12. I observed some other issues in help copy/paste with MacOS. Do you know how giac is compiled on your distribution? I wonder if it is linked with fltk 1.3 or 1.4.

Re: Problem with examples from Help

Publié : sam. oct. 04, 2025 4:52 am
par GermanXG
I compiled Xcas from source and linked with fltk 1.3. Here a link to a video that show the problem. Notice both examples use the same point (1,1), which seems to be the problem (Or I think so):

https://youtu.be/8cL6Evk4aD0

Re: Problem with examples from Help

Publié : sam. oct. 04, 2025 1:29 pm
par parisse
Thanks for the video, I have now the explanation, it is not related to the FLTK version.
When you remove one level from the figure, it is re-evaled, and then segment(..,A,B) is called with A and B assigned from the previous evaluation. But segment does not auto-quote the optional arguments A and B, so the CAS errors because you can not store something in the value of A.

Workaround: add quotes, like this
segment(point(i),point(1+i),'A','B')

I fixed the help file (you can fix it in your install by editing /usr/share/giac/aide_cas)

Re: Problem with examples from Help

Publié : dim. oct. 05, 2025 6:55 am
par GermanXG
Thanks, it works fine now.