home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / grs / g / firework < prev    next >
Encoding:
Text File  |  1991-05-14  |  872 b   |  67 lines

  1. (null) expression rocket, swirl,minplus,zeromin,plusplus;
  2. integer x, y, xinc, yinc;
  3. let string char := "x";
  4.  
  5. minplus :=
  6. {
  7.     x := x-1;
  8.     y := y+1;
  9.     tab(x,y);
  10.     write(char);
  11. };
  12. zeromin :=
  13. {
  14.     y := y-1;
  15.     tab(x,y);
  16.     write(char);
  17. };
  18. plusplus :=
  19. {
  20.     x := x+1;
  21.     y := y+1;
  22.     tab(x,y);
  23.     write(char);
  24. };
  25.  
  26.  
  27. swirl :=
  28. {
  29.     run(minplus);
  30.     run(minplus);
  31.     run(zeromin);
  32.     run(zeromin);
  33.     run(zeromin);
  34.     run(zeromin);
  35.     run(plusplus);
  36.     run(plusplus);
  37.     run(plusplus);
  38.     run(plusplus);
  39.     run(zeromin);
  40.     run(zeromin);
  41.     run(zeromin);
  42.     run(zeromin);
  43.     run(minplus);
  44.     run(minplus);
  45. };
  46.  
  47. rocket :=
  48. {
  49.    x:=5;
  50.    y:=27;
  51.    yinc := -1;
  52.    loop
  53.       exiton(x=75);
  54.       cls();
  55.       beep();
  56.       run(swirl);
  57.       x:= x+2;
  58.       if y=12 then
  59.          yinc := 1;
  60.       endif;
  61.       y:= y + yinc;
  62.    endloop;
  63. };
  64.  
  65. run(rocket);
  66. cls();
  67.