Switch: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Plugwash (talk | contribs)
No edit summary
 
Plugwash (talk | contribs)
No edit summary
Line 1: Line 1:
The '''switch''' statement in con is similar to that in C.
The '''switch''' statement in con is similar to that in C.


switch <gamevar>
  switch <gamevar>
  case <constant>
    case <constant>
    <do something>
      <do something>
    [[break]]
      [[break]]
  case <constant>
    case <constant>
    <do something>
      <do something>
    break
      break
endswitch
  endswitch

Revision as of 16:34, 30 August 2005

The switch statement in con is similar to that in C.

 switch <gamevar>
   case <constant>
     <do something>
     break
   case <constant>
     <do something>
     break
 endswitch