//---------------------------------------------------- // This is an over-glorified test of the // WHILE/ENDWHILE construct, buried in the // doTriangle() function. If it works, you should // end up with three filled-in triangles. // // Copyright (c) 1999 Lighting and Sound Technologies. // Written by Ryan C. Gordon. //---------------------------------------------------- function main() returns nothing hideTurtle() nuclearSymbol(150) endfunction function nuclearSymbol(number size) returns nothing number i setPenColor(14) for i = 1 to size setAngle(300) doTriangle(i) setAngle(180) doTriangle(i) setAngle(60) doTriangle(i) endfor endfunction function doTriangle(number size) returns number number i i = 1 while (i <= 3) i = i + 1 goForward(size) turnRight(360 / 3) endwhile endfunction