#include <Scratc.h>
int main (int arc, char **argv)
{
   whenGreenFlag ();
   stopScripts ("all");
   whenKeyPressed ("space");
   stopScripts ("all");
   whenClicked ();
   stopScripts ("all");
   whenSceneStarts ("backdrop1");
   stopScripts ("all");
   whenIReceive ("message1");
   stopScripts ("all");
   broadcast ("message1");
   stopScripts ("all");
   whenSensorGreaterThan ("loudness", readVariable ("stage whisper"));
   stopScripts ("all");
   whenSensorGreaterThan ("loudness", 10);
   stopScripts ("all");
   whenSensorGreaterThan ("loudness", 0);
   stopScripts ("all");
   whenGreenFlag ();
   doBroadcastAndWait ("message1");
   stopScripts ("all");
   whenGreenFlag ();
   playSound ("pop");
   doPlaySoundAndWait ("pop");
   stopAllSounds ();
   playDrum (1, 0.25);
   rest_elapsed_from (0.25);
   noteOn_duration_elapsed_from (60, 0.5);
   instrument (1);
   changeVolumeBy (-10);
   setVolumeTo (100);
   changeTempoBy (20);
   setTempoTo (60);
   say (volume ());
   say (tempo ());
   playDrum (readVariable ("sound menu item"),
	     readVariable ("sound variable"));
   rest_elapsed_from (readVariable ("sound variable"));
   noteOn_duration_elapsed_from (readVariable ("sound menu item"),
				 readVariable ("sound variable"));
   instrument (readVariable ("sound menu item"));
   changeVolumeBy (readVariable ("sound variable"));
   setVolumeTo (readVariable ("sound variable"));
   changeTempoBy (readVariable ("sound variable"));
   setTempoTo (readVariable ("sound variable"));
   whenGreenFlag ();
   clearPenTrails ();
   stampCostume ();
   putPenDown ();
   putPenUp ();
   penColor (2402869);
   changePenHueBy (10);
   setPenHueTo (0);
   changePenShadeBy (10);
   setPenShadeTo (50);
   changePenSizeBy (1);
   penSize (1);
   penColor (readVariable ("pen variable"));
   changePenHueBy (readVariable ("pen variable"));
   setPenHueTo (readVariable ("pen variable"));
   changePenShadeBy (readVariable ("pen variable"));
   setPenShadeTo (readVariable ("pen variable"));
   changePenSizeBy (readVariable ("pen variable"));
   penSize (readVariable ("pen variable"));
   whenGreenFlag ();
   setVar_to ("stage whisper", readVariable ("stage whisper"));
   changeVar_by ("stage whisper", readVariable ("stage whisper"));
   setVar_to ("stage whisper", 0);
   changeVar_by ("stage whisper", 1);
   setVar_to ("stage whisper", StrADD (readVariable ("stage whisper"), 1));
   changeVar_by ("stage whisper",
		 StrADD ("", readVariable ("stage whisper")));
   showVariable ("stage whisper");
   hideVariable ("stage whisper");
   deleteLine_ofList ("all", "list variable");
   append_toList ("thing", "list variable");
   append_toList ("0", "list variable");
   append_toList (readVariable ("stage whisper"), "list variable");
   append_toList (StrADD (readVariable ("stage whisper"), 4),
		  "list variable");
   deleteLine_ofList (1, "list variable");
   deleteLine_ofList ("last", "list variable");
   deleteLine_ofList (StrSUB (lineCountOfList ("list variable"), 1),
		      "list variable");
   insert_at_ofList ("thing", 1, "list variable");
   insert_at_ofList ("thing", "last", "list variable");
   insert_at_ofList ("thing", "random", "list variable");
   insert_at_ofList ("thing", readVariable ("stage whisper"),
		     "list variable");
   setLine_ofList_to (1, "list variable", "thing");
   setLine_ofList_to ("last", "list variable",
		      readVariable ("stage whisper"));
   setLine_ofList_to ("random", "list variable", "thing");
   setLine_ofList_to (readVariable ("stage whisper"), "list variable",
		      "thing");
   hideList ("list variable");
   showList ("list variable");
   say (getLine_ofList (readVariable ("stage whisper"), "list variable"));
   say (getLine_ofList (1, "list variable"));
   say (getLine_ofList ("last", "list variable"));
   say (getLine_ofList ("random", "list variable"));
   whenGreenFlag ();
   whenKeyPressed ("space");
   whenIReceive ("message1");
   broadcast ("message1");
   doBroadcastAndWait ("message1");
   broadcast (readVariable ("stage whisper"));
   doBroadcastAndWait (readVariable ("stage whisper"));
   whenSensorGreaterThan ("loudness", 10);
   whenSceneStarts ("backdrop1");
   whenClicked ();
   whenSensorGreaterThan ("loudness", readVariable ("stage whisper"));
   whenCloned ();
   deleteClone ();
   whenGreenFlag ();
   createCloneOf ("_myself_");
   if (StrEQ (readVariable ("stage whisper"), "1")) {
      setVar_to ("stage whisper", 0);
   }
   if (StrEQ ("1", readVariable ("stage whisper"))) {
      setVar_to ("stage whisper", 0);
   } else {
      setVar_to ("stage whisper", 0);
   }
   do {
      wait_elapsed_from (0.001);
   } while (StrEQ (readVariable ("stage whisper"), "0"));
   while (!(StrEQ (readVariable ("stage whisper"), "1"))) {
      setVar_to ("stage whisper", 0);
   }
   wait_elapsed_from (1);
   {
   int _i;
      for (_i = 0; _i < 10; _i++) {
	 setVar_to ("stage whisper", 0);
      }
   }
   wait_elapsed_from (readVariable ("stage whisper"));
   {
   int _i;
      for (_i = 0; _i < readVariable ("stage whisper"); _i++) {
	 setVar_to ("stage whisper", 0);
      }
   }
   stopScripts ("all");
   whenGreenFlag ();
   for (;;) {
      setVar_to ("stage whisper", 0);
   }
   whenGreenFlag ();
   createCloneOf ("_myself_");
   if (false) {
   null}
   if (false) {
   null} else {
   null}
   do {
      wait_elapsed_from (0.001);
   } while (false);
   while (!(false)) {
   null}
   wait_elapsed_from (1);
   {
   int _i;
      for (_i = 0; _i < 10; _i++) {
      null}
   }
   wait_elapsed_from (readVariable ("stage whisper"));
   {
   int _i;
      for (_i = 0; _i < readVariable ("stage whisper"); _i++) {
      null}
   }
   stopScripts ("all");
   whenGreenFlag ();
   {
   int _i;
      for (_i = 0; _i < 10; _i++) {
	 if (StrEQ (readVariable ("stage whisper"), "1")) {
	    if (StrEQ (readVariable ("stage whisper"), "0")) {
	       changeVar_by ("stage whisper", 1);
	    }
	 } else {
	    setVar_to ("stage whisper", 0);
	 }
	 ;
      }
   }
   whenGreenFlag ();
   do {
      wait_elapsed_from (0.001);
   } while (touching (""));
   do {
      wait_elapsed_from (0.001);
   } while (touchingColor (727745));
   do {
      wait_elapsed_from (0.001);
   } while (color_sees (4398039, 3536401));
   do {
      wait_elapsed_from (0.001);
   } while (keyPressed ("space"));
   do {
      wait_elapsed_from (0.001);
   } while (mousePressed ());
   doAsk ("What's your name?");
   if (StrEQ (getUserName (), "fred")) {
      say (StrADD (timer (), soundLevel ()));
   }
   if (StrEQ (mouseX (), mouseY ())) {
      say (senseVideoMotion ("motion", "this sprite"));
   }
   if (StrEQ (distanceTo (""), answer ())) {
      setVideoState ("on");
      timerReset ();
      setVideoTransparency (50);
   }
   if (StrEQ (timeAndDate ("minute"), timestamp ())) {
      say (getAttribute_of ("x position", "Sensing test"));
   }
   if (StrEQ (timeAndDate ("year"), timestamp ())) {
      say (getAttribute_of ("x position", "Sensing test"));
   }
   if (StrEQ (distanceTo ("_mouse_"), answer ())) {
      setVideoState ("on");
      timerReset ();
      setVideoTransparency (50);
   }
   if (StrEQ (distanceTo ("Data test"), answer ())) {
      setVideoState ("on");
      timerReset ();
      setVideoTransparency (50);
   }
   whenGreenFlag ();
   say (StrADD (10, 10));
   say (StrSUB (10, 10));
   say (StrSUB ("", 10));
   say (StrMUL (10, 10));
   say (StrDIV (10, 10));
   say (randomFrom_to (10, 10));
   say (StrLT ("", ""));
   say (StrEQ ("", ""));
   say (StrGT ("", ""));
   say (StrAND (StrLT ("", ""), StrGT ("", "")));
   say (StrOR (StrEQ ("", ""), StrEQ ("", "")));
   say (StrOR (StrGT ("", ""), StrLT ("", "")));
   say (not (StrEQ ("", "")));
   say (concatenate_with ("", ""));
   say (letter_of (10, ""));
   say (stringLength (""));
   say (%(10, 10));
   say (rounded (10));
   say (computeFunction_of ("sqrt", 10));
   say (StrADD (readVariable ("a"), readVariable ("b")));
   say (StrSUB (readVariable ("a"), readVariable ("b")));
   say (StrSUB ("", readVariable ("b")));
   say (StrMUL (readVariable ("a"), readVariable ("b")));
   say (StrDIV (readVariable ("a"), readVariable ("b")));
   say (randomFrom_to (readVariable ("a"), readVariable ("b")));
   say (StrLT (readVariable ("a"), readVariable ("b")));
   say (StrEQ (readVariable ("a"), readVariable ("b")));
   say (StrGT (readVariable ("a"), readVariable ("b")));
   say (StrAND
	(StrLT (readVariable ("a"), readVariable ("b")),
	 StrGT (readVariable ("a"), readVariable ("b"))));
   say (StrOR
	(StrEQ (readVariable ("a"), readVariable ("b")),
	 StrEQ (readVariable ("a"), readVariable ("b"))));
   say (StrOR
	(StrGT (readVariable ("a"), readVariable ("b")),
	 StrLT (readVariable ("a"), readVariable ("b"))));
   say (not (StrEQ (readVariable ("a"), readVariable ("b"))));
   say (concatenate_with (readVariable ("a"), readVariable ("b")));
   say (letter_of (readVariable ("a"), readVariable ("stage whisper")));
   say (stringLength (readVariable ("stage whisper")));
   say (%(readVariable ("a"), readVariable ("b")));
   say (rounded (readVariable ("a")));
   say (computeFunction_of ("sqrt", readVariable ("a")));
   procDef ("a test block %n %s %b label", number1 ("string1", "boolean1"), 1;
	    ""; false, false);
   call ("a test block %n %s %b label", 1, "", false);
   call ("a test block %n %s %b label", 1, "string", false);
   call ("a test block %n %s %b label", readVariable ("variable"),
	 readVariable ("variable"),
	 not (StrEQ
	      (readVariable ("variable"), readVariable ("stage whisper"))));
}
