From: SourceForge.net <no...@so...> - 2011-08-12 14:42:43
|
Bugs item #2998214, was opened at 2010-05-07 17:18 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2998214&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None >Status: Closed Resolution: Works For Me Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Cell can't end with a comment Initial Comment: When the last line in a cell is comment, maxima comlains about premature termination of input. To reproduce: Just enter a comment only in a input cell. /*Comment*/ and evaluate. Why do you need that? If you want to do somehting like this: a:99 /*assign a the magic value*/ ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2011-08-12 16:42 Message: Setting the status to closed. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Jose Sanchez-Marin (js-m) Date: 2011-08-09 19:55 Message: Hi It's not so elegant, but I always ends a comment at the end of a cell with 1$: /* comment*/1$ Of course, the 1 is optative: whatever acceptable character is good. It is the simplest way of not ending the cell with a comment. Your example should look like this: a:99 /*assign a the magic value*/1$ ---------------------------------------------------------------------- Comment By: Dieter Kaiser (crategus) Date: 2011-08-04 22:50 Message: As written in one of the posts, it is save to use the syntax a:99 /* Comment */ ; in wxMaxima. The following syntax a:99; /* Comment */ might give an error in wxMaxima, because wxMaxima automatically appends an ;-char and a comment followed by a ;-char is not a valid command. Furthermore, I do not see a problem with a comment at the end of a file with SBCL. I have tried the Maxima versions 5.9, 5.10, 5.11, 5.12, 5.13, 5.14, 5.15, 5.16, 5.17, 5.18, 5.19, 5.20, and 5.25post and had no problems loading the test file of the last posting. I have tried several variations of the file and had a look at the code to search for a potential problem. Perhaps, we can close this bug report and open a new bug report, if we have a report with a known Lisp and Maxima version. Setting the status to pending and the resolution to "works for me". Dieter Kaiser ---------------------------------------------------------------------- Comment By: Robert Dodier (robert_dodier) Date: 2010-06-03 17:54 Message: This is actually a bug in the Maxima parser if I am not mistaken; it is not specific to wxMaxima so far as I know. At one time (maybe it is still true) the parser would barf on a batch script if it ended with a comment. I just tried that with Maxima 5.20.0 + GCL + Windows but the script was loaded successfully. Maybe the bug has been fixed? Need to test on other platforms and Lisp implementations. To the original poster: what does build_info(); report? Here is my test script: x:1; /* comment */ ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2010-05-27 08:55 Message: Got it. A comment can't be the only text in a field. /*comment*/a:99 and a:99/*comment*/ both work ok. wxMaxima appears to append a semicolon to the line if it is absent. /*comment*/ gets a semicolon appended, then an error message "incorrect syntax: Premature termination of input at ;. /*comment*/; ^" With the caret indicating the closing slash of the comment. Using a $ terminator gets a similar message, no semicolon is appended, and the caret indicates the closing slash as before. ---------------------------------------------------------------------- Comment By: Peter Cusack (pogo1) Date: 2010-05-27 03:53 Message: I note that wmMaxima version 0.8.5 helpfully adds a semicolon and that fixes the problem sometimes. I'm still trying to make it reproducibly fail. If the line contains a $ terminator before the comment ( like this B0:i*Mu0/(2*a)/*Field at centre of single turn*/$) then adding the semicolon at the end makes Maxima hang. ---------------------------------------------------------------------- Comment By: l_butler () Date: 2010-05-20 10:16 Message: Hi, I think the problem is that Maxima input must be terminated with a semi-colon: a:99; /* comment */ a:99 /* comment */; Both are valid inputs that assign 99 to a. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2998214&group_id=4933 |