Selasa, 07 April 2020

SMALL BASIC: For determined start row and col

Hi, SMALL BASIC programmer, welcome.

Did you know that small basic for can be started not only from the beginning or a.k.a line 0 or row 0 and col 0?

Below is the example:

traversed_row = 3
traversed_col = 4

For i = traversed_row To 5
    If i = traversed_row Then
      For j = traversed_col To 5
        TextWindow.WriteLine("i : " + i + ", j: " + j)
      EndFor
    else
    For j = 0 To 5
      TextWindow.WriteLine("i : " + i + ", j: "+ j)
    EndFor
  endif
EndFor

   
    

Tidak ada komentar:

Posting Komentar