Run a script

A script file is a text file that contains a sequence of Shang commands. For example, a file with name "testscript.txt" may contain the following lines
 f = (h, r, theta) -> r^2 + h * (1 + cos(theta));
 h = 3.5;
 r = 5;
 theta = pi / 2;
 f(h, r, theta)
In the interactive mode, if the following command is issued
>> run("testscript.txt");
   28.5
>>
All the commands in the script file will be executed as if they were just typed in.



oz 2009-12-22