Rolf Huehne wrote:

>The first thing I noticed was that I had to provide the whole loop
>commands in a single line. Distributing it over several lines as in the
>example provided in the documentation resulted in the following error
>message:
>
>  script compiler ERROR: missing END for for
>
>My script commands first initialize the echo and then run the countdown:
>
>  set echo myecho 1% 99%; ~cd="Start"; echo %{~cd};
>  for ( var i=5; i>0; i = i - 1); ~cd=i; delay 1; end for; ~cd="";
>
>The loop never got beyond displaying "5" and I had to type "quit" in
>order to be able to run additional commands.
>
>  
>
The following both work OK in Jmol 11.3.25:

  for ( var i=5; i>0; i = i - 1); ~cd=i; delay 1; echo @i; end for; ~cd="";

  for ( var i=5; i>0; i = i - 1)
    ~cd=i
    delay 1
    echo @i
  end for
  ~cd=""


Of course, without the echo, it just sits there for 5 seconds looping. 
Maybe that's the problem?


>If I used a "while" loop instead it worked as expected:
>
>  i=5; while (i>0); ~cd=i; delay 1; i = i - 1; end while; ~cd="";
>
>
>While testing this I noticed that the application (in contrast to the
>applet) freezes immediately after typing the last letter of the command
>"pause".
>  
>
that's a bug. Introduced in 11.3.10; fixed in Jmol 11.3.26.


>---- Test System ----------------
> Jmol: 11.3.25, application
> Java: 1.5.0_12
> OS  : Linux, OpenSuSE 10.2
>---------------------------------
>
>Regards,
>Rolf
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2005.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to