Closed rtoy closed 1 week ago
Imported from SourceForge on 2024-07-07 12:42:33 Created by robert_dodier on 2006-07-29 06:30:18 Original: https://sourceforge.net/p/maxima/bugs/568/#4b47
Imported from SourceForge on 2024-07-07 12:42:37 Created by robert_dodier on 2006-07-29 06:30:18 Original: https://sourceforge.net/p/maxima/bugs/568/#cb84
Logged In: YES user_id=501686
Observed in 5.9.3cvs. Although the final example is:
(%i1) inchar:"9"; (%o1) 9 (92) foo; (%o2) foo (93) "914"; (%o3) 914
Imported from SourceForge on 2024-07-07 12:42:40 Created by crategus on 2010-03-21 19:13:02 Original: https://sourceforge.net/p/maxima/bugs/568/#7849
Imported from SourceForge on 2024-07-07 12:42:44 Created by crategus on 2010-03-21 19:13:02 Original: https://sourceforge.net/p/maxima/bugs/568/#04e0
I do not see a problem with the assignment of values to $inchar with Maxima 5.20post.
The labels are build up in the routine makelabel out of the value of $inchar and the current linenum. The function $concat is called to do this. The first argument of $concat determines the type of the label. It does not matter what type we have for $inchar, we always get a symbol.
If we set $inchar to a string we get:
(%i2) inchar:"string"; (%o2) string
(string3) foo$
We refer the input line string3. Internally it is the symbol $string3:
(string4) string3; (%o4) foo
But we can not refer the input line with a string. This bevavior is correct:
(string5) "string3"; (%o5) string3
Internally a label is build up from $inchar and the current linenum:
(string6) :lisp (makelabel $inchar) $STRING6
The type of the label is always a symbol:
(string6) :lisp (type-of (makelabel $inchar)) SYMBOL
If we set $inchar to a number we get a symbol too:
(%i2) inchar:9$
The input label is not a number but the symbol $93:
(93) :lisp (makelabel $inchar) $93
Again with a string out of a number. We get the same result. The label is again $93:
(%i2) inchar:"9"$ (93) :lisp (makelabel $inchar) $93
This works even for an empty string:
(%i2) inchar:""$ (3) :lisp (makelabel $inchar) $3
We can not refer the line from the command line with a number:
(4) foo$ (5) 4; (%o5) 4
But we can do it the following way:
(6) ?$4; (%o6) foo
Setting the status to pending and the resolution to "works for me". Dieter Kaiser
Imported from SourceForge on 2024-07-07 12:42:47 Created by sf-robot on 2010-04-05 02:20:30 Original: https://sourceforge.net/p/maxima/bugs/568/#1cb5
This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
Imported from SourceForge on 2024-07-07 12:42:51 Created by sf-robot on 2010-04-05 02:20:30 Original: https://sourceforge.net/p/maxima/bugs/568/#6c37
Imported from SourceForge on 2024-07-07 12:42:31 Created by macrakis on 2004-05-10 16:58:22 Original: https://sourceforge.net/p/maxima/bugs/568
inchar:"q"$ (q28) foo$ (q29) q28; => q28 (q30) "q28" => foo !!! It has assigned a value to a string, which is illegal: (q31) "q28": 234234; => improper value assignment
especially amusing if you assign inchar:""....
inchar also allows itself to be assigned a number:
inchar:"9" (932) foo$ (933) ?\932; => foo