home *** CD-ROM | disk | FTP | other *** search
- (* g.speedtest -quick demo of counting etc *)
- null function go()
- {
- string s;
- write("Hit 'g' and then return to go\n");
- read(s);
- };
-
-
- write("Speedtest - a quick demonstration of \nthe speed of the GRS interpreter.\n\n");
-
- let integer i := 0;
-
- write("Count up to 500 and back down ...\n");
- go();
-
- let integer indent := 0;
- let integer increment := 1;
- integer in_count;
-
- loop
- exiton(i=500);
- write(i,"\n");
- i := i+1;
- endloop;
- loop
- exiton(i=0);
- write(i,"\n");
- i := i-1;
- endloop;
-
- write("Now swirly patterns ...\n");
- go();
-
- loop
- exiton(i=150);
- in_count := 0;
- loop
- exiton(in_count = indent);
- write(" ");
- in_count := in_count + 1;
- endloop;
- write(i,"\n");
- i := i+1;
- if (indent =75) then
- increment := -1;
- endif;
- if (indent =0) then
- increment := 1;
- endif;
- indent := indent + increment;
- endloop;
-
-