Simple Multiline Calculator
Calculates cumulatively line by line; first it evaluates line 1,
then line1+line2,
then lines1..3, and so on.

For each line, it shows the result so far; typically the result of the expression on that line. You can use different lines for writing different expressions and assignments. The syntax is javascript; implemented using eval(). eg (try copy and paste into input area to test)

It can be 'seeded' with an input calculation using a search term (after the ? in the url). It is handy to bookmark; especially with a '?%s' in the URL (eg file:///c:/utils/calc2.html?%s); and to assign the bookmark a keyword such as '='. You can then launch it using for example = 5+6 in the address bar. (If you know how to automate this bookmarking, let me know.)

The input is prepopulated with line feeds so you can type directly into any line you like for clearer format.

An expression entered on multiple lines may fail at an intermediate point and then recover. eg:

   3+                    // fails
   4                     // => 7
   j=0                   // => 0
   for(i=0; i<10; i++)   // fails
     j+=i                // => 45
   'final j = ' + j      // => final j = 45 
By default, there is a complete cumulative recalculation at each keystroke. Click the 'AutoRun' button to toggle this mode. With 'AutoRun Off', hit 'Run' to calculate.