Difference between revisions of "Switch case"

From Digipool-Wiki
Jump to: navigation, search
(Created page with " Switch-Case Beispiel <pre> switch (page) { case 1: playIntro(); break; case 2: playGame(); break;...")
 
 
Line 4: Line 4:
 
<pre>     
 
<pre>     
  
switch (page) {
+
switch (pageNr) {
 
         case 1:
 
         case 1:
 
             playIntro();
 
             playIntro();

Latest revision as of 20:39, 20 June 2020

Switch-Case Beispiel

    

switch (pageNr) {
        case 1:
            playIntro();
            break;
        case 2:
            playGame();
            break;
        case 3:
            gameEnd();
            break;
        case 4:
            showScore();
            break;
}