WHILEFOR.sml

  Download

More scripts: SML Fundamentals

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# WHILEFOR.SML
# sample script for "Writing Scripts with SML"
#
numeric a, i;
clear();
while (a <= 360) {
 print (a, sin(a/deg));
 a = a + 10;
}
print ("#####");
for i = 30 to 360 step 30 {
  if (abs(sind(i)) > 0.0001)
     print (i, sind(i));
  else 
     print (i, "0.0");
	}