Senin, 30 Maret 2020

SMALL BASIC: Shifting partly array's element

Hi, welcome, Small Basic Programmer, welcome.

In this tutorial we will learn about shifting partly array's element and remove the trail. This often needed in some cases of programming.

For instance, we have array:
ourarray[10]

For i = 0 To 10
  ourarray[i] = i
EndFor

TextWindow.WriteLine("Enter the start of shifted components of the main array: ")
start = textwindow.Read()
For i = start  To 10
  ourarray[i-1] = ourarray[i]
EndFor


oa_l = Array.GetItemCount(ourarray)
For i = 0 To oa_l - 1
  TextWindow.Write(ourarray[i])
  TextWindow.Write(",")
  Program.Delay(1000)
EndFor


  

Tidak ada komentar:

Posting Komentar