Miguel wrote:

Bob,

I see that you recently checked in a change to Eval.java

It looks like you went through and added some statementLength checking to
a number of commands.

Your intentions were good.

However, be advised that there is separate statement length checking that
happens at script compile time. The table in Token.java contains flags
that are used by the compiler that designate the minimum number of
arguments that are required for specific commands. Therefore, these
runtime errors of insufficient statement length will not be triggered
because they will be caught at script compile time.

Yeah, I realized that. I decided a bit of redundancy here was ok as a model for general practice. I had found some other commands that when no parameters were given, crashed the applet. (load, for example). So I added these.

If there were problems with some specific cases then we should fix on a
case-by-case basis in either Compiler.java or Token.java.

But, in general we should not be running these tests. If there is an
inconsistency between the compiler and the runtime then that indicates a
fundamental problem and we want it to fail catastrophically, not
*gracefully* ... you should roll-back your change.

OK, I'll do that.

Miguel



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to