Problem with examples from Help

Messages in english

Modérateur : xcasadmin

GermanXG
Messages : 21
Inscription : mar. déc. 24, 2024 6:24 am

Problem with examples from Help

Message par GermanXG » mer. oct. 01, 2025 6:12 am

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

parisse
Messages : 5921
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Problem with examples from Help

Message par parisse » jeu. oct. 02, 2025 8:20 am

Are you on MacOS, Windows or Linux?

GermanXG
Messages : 21
Inscription : mar. déc. 24, 2024 6:24 am

Re: Problem with examples from Help

Message par GermanXG » jeu. oct. 02, 2025 6:43 pm

Linux, PCLinux OS distro

parisse
Messages : 5921
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Problem with examples from Help

Message par parisse » ven. oct. 03, 2025 1:37 pm

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.

GermanXG
Messages : 21
Inscription : mar. déc. 24, 2024 6:24 am

Re: Problem with examples from Help

Message par GermanXG » sam. oct. 04, 2025 4:52 am

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

parisse
Messages : 5921
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Problem with examples from Help

Message par parisse » sam. oct. 04, 2025 1:29 pm

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)

GermanXG
Messages : 21
Inscription : mar. déc. 24, 2024 6:24 am

Re: Problem with examples from Help

Message par GermanXG » dim. oct. 05, 2025 6:55 am

Thanks, it works fine now.

Répondre