Difference between revisions of "SaveIP"

Jump to navigation Jump to search
No change in size ,  16:19, 1 September 2007
m
no edit summary
imported>TS7
m (Reverted edit of Hd4Uli, changed back to last version by DragoonWraith)
imported>Hd4Uli
m
Line 20: Line 20:
    
    
     ; update the loop counter
     ; update the loop counter
     set var to var + 1
     set var to var   1
    
    
     ; we only want to go through the loop three times, so check the loop counter
     ; we only want to go through the loop three times, so check the loop counter
Line 40: Line 40:


A more familiar For-loop in a normal programming language would look like this:
A more familiar For-loop in a normal programming language would look like this:
<pre>for (i = 0; i < 5; i++)
<pre>for (i = 0; i < 5; i )
{
{
   for (j = 0; j < 3 ; j++)
   for (j = 0; j < 3 ; j )
   {
   {
     //Do Something
     //Do Something
Line 56: Line 56:
   Label 1 ; top of inner loop
   Label 1 ; top of inner loop
     PrintToConsole "i = %.0f, j = %.0f" i, j
     PrintToConsole "i = %.0f, j = %.0f" i, j
     set j to ( j + 1 )
     set j to ( j   1 )
     if ( j < 3 )
     if ( j < 3 )
       GoTo 1 ; equivalent to RestoreIP 1
       GoTo 1 ; equivalent to RestoreIP 1
     endif
     endif
   set i to ( i + 1 )
   set i to ( i   1 )
   if ( i < 5 )
   if ( i < 5 )
     GoTo 0
     GoTo 0
Anonymous user

Navigation menu