Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860
Fear Not Demon Curses - Huben's Wiki

Fear Not Demon Curses

From Huben's Wiki
Jump to: navigation, search
(Created page with "If we make even the tiniest mistake during our incantations, our demons will hurl dire curses at us, called '''error messages'''. Consider this simplest of demons: <pre> public ...")
 
Line 12: Line 12:
 
</pre>
 
</pre>
  
 +
* What is the name of the demon we are creating with this incantation?
 
* Paste it into Dr.Java.
 
* Paste it into Dr.Java.
 
* Save the new file onto your H drive.
 
* Save the new file onto your H drive.
 
* Compile it and then run it.
 
* Compile it and then run it.
 
* Where does the result appear?
 
* Where does the result appear?
 +
 +
Now comes the wierdness!
  
 
* Remove one of the curly braces, save,compile and run.
 
* Remove one of the curly braces, save,compile and run.
 
* Write down the error message the demon screams.
 
* Write down the error message the demon screams.
 
* Does that error message make sense to you?  Does it show where you needed that curly brace?
 
* Does that error message make sense to you?  Does it show where you needed that curly brace?
 
 
* Try removing each of the curly braces, one at a time, and answer the same questions.   
 
* Try removing each of the curly braces, one at a time, and answer the same questions.   
 
* Try adding a single curly brace, and answer the same questions.   
 
* Try adding a single curly brace, and answer the same questions.   
 
* Do the curses change?   
 
* Do the curses change?   
 
* They are always true, but are they ever helpful?
 
* They are always true, but are they ever helpful?
 +
 +
Here is your trial by fire!
  
 
* Restore the unindented version of HelloGraphics from the previous class.
 
* Restore the unindented version of HelloGraphics from the previous class.
Line 30: Line 34:
 
* Everybody take turns!
 
* Everybody take turns!
  
Improperly matched braces are the most common and confusing errors!
+
Improperly matched braces are the most common and confusing errors.  Knowing this, you can repair many incantations with confidence, even if you are unsure of their meaning.

Revision as of 11:38, 11 September 2012

Personal tools
translate