rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

strings not comparable by less-than sign #3109

Open rtoy opened 2 weeks ago

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 13:45:31 Created by rvh2007 on 2008-09-07 16:39:21 Original: https://sourceforge.net/p/maxima/bugs/1494


To reproduce this

(%i1) is("John">"Barry"); Maxima encountered a Lisp error: Error in PROGN [or a callee]: Caught fatal error [memory may be damaged] Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil.

(%i2) build_info()$ Maxima version: 5.16.3 Maxima build date: 22:48 8/24/2008 host type: i686-pc-mingw32lisp-implementation-type: GNU Common Lisp (GCL) lisp-implementation-version: GCL 2.6.8

This is a bug even though it is not the right way to compare strings.

Rich

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 13:45:32 Created by robert_dodier on 2008-09-07 22:31:42 Original: https://sourceforge.net/p/maxima/bugs/1494/#a5b4


rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 13:45:35 Created by robert_dodier on 2008-09-07 22:31:42 Original: https://sourceforge.net/p/maxima/bugs/1494/#b1cb


Logged In: YES user_id=501686 Originator: NO

Looks like MGRP and MGQP in src/compar.lisp should be equipped with special cases to handle strings.

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 13:45:39 Created by willisbl on 2008-09-08 11:01:27 Original: https://sourceforge.net/p/maxima/bugs/1494/#e6c9


Logged In: YES user_id=895922 Originator: NO

Strings can sometimes be used as identifiers:

(%i5) "a+b" - (a-b); (%o5) b-a+a+b

(%i6) %-"a+b"; (%o6) b-a

(%i7) cos("a"); (%o7) cos(a)

(%i10) "a" : 42; "a" improper value assignment

Sometimes they cannot be: assume("a" > 0) --> error and floor("a") --> error. Before we allow mgrp and mgqp to work on strings, we need a general policy on string identifiers.

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 13:45:42 Created by robert_dodier on 2022-11-03 17:17:08 Original: https://sourceforge.net/p/maxima/bugs/1494/#55e0