Advertisement
babusha

Untitled

Nov 10th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | None | 0 0
  1. case (byte) Command.LOOP_BEG:
  2.                         if(Cell.Value == 0)
  3.                         {
  4.                             int depth = 0;
  5.                             while(true)
  6.                             {
  7.                                 begin:
  8.                                 switch (ByteCode[IP])
  9.                                 {
  10.                                     case (byte) Command.LOOP_BEG:
  11.                                         depth++;
  12.                                         break;
  13.                                     case (byte) Command.LOOP_END:
  14.                                         depth--;
  15.                                         if(depth == 0) goto end;
  16.                                         break;
  17.  
  18.                                 }
  19.                                 IP++;
  20.                                 goto begin;
  21.  
  22.                                 end:
  23.                                 break;
  24.                             }
  25.                         }
  26.                         else
  27.                         {
  28.                             Stack.Push(IP);
  29.                         }
  30.                         break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement