ho, ho! It's correct!

You are putting it back into the FOR loop just before it prints, so it
prints. Then it checks and finds that it is > 4, so it exits.

You would nee this to stop it:

function test_throw(doit) {
    for (var i = 0; i < 4; i++) {
        if (doit) throw CONTEXT test
        if (i >= 4) break;
        print i
    }
}

Bob



On Sat, Mar 8, 2014 at 2:07 PM, Robert Hanson <[email protected]> wrote:

> hmm, there's a good point! OK, I'll fix that, then release this.
>
>
> On Sat, Mar 8, 2014 at 1:02 PM, Ron Mignery <[email protected]> wrote:
>
>> I'm seeing some anomaly with THROW in the application:
>>
>> $ function test_throw(doit) {
>>     for (var i = 0; i < 4; i++) {
>>         if (doit) throw CONTEXT test
>>         print i
>>     }
>> }
>>
>> $ test_throw(false)
>> 0
>> 1
>> 2
>> 3
>> $ test_throw(true)
>> $ print test
>> {
>> _path : "[script] >> function test_throw"
>> _retval : 0
>> doit :
>> true
>> i : 0
>> }
>> $ &test
>> 0
>> $ &test
>> 1
>> $ &test
>> 2
>> $ &test
>> 3
>> $ &test
>> 4 ?
>> $ &test
>> 5 ?
>> $ &test
>> 6 ?
>>
>> >On Thu, Mar 6, 2014 at 10:13 AM, Robert Hanson <[email protected]>
>> wrote:
>> ...
>> >Do let me know if there are any bugs I've forgotten to fix before
>> tomorrow
>> >afternoon for 14.0.11 and 14.1.11 (will be identical)
>> ...
>>
>>
>> ------------------------------------------------------------------------------
>> Subversion Kills Productivity. Get off Subversion & Make the Move to
>> Perforce.
>> With Perforce, you get hassle-free workflows. Merge that actually works.
>> Faster operations. Version large binaries.  Built-in WAN optimization and
>> the
>> freedom to use Git, Perforce or both. Make the move to Perforce.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> Robert M. Hanson
> Larson-Anderson 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
>
>


-- 
Robert M. Hanson
Larson-Anderson 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
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to