Selasa, 31 Maret 2020

SMALL Basic: Learn to read array and multi array

Hello Small Basic programmer, welcome.

In this tutorial we will learned about reading single row multi colomn array and multi row and multi colomn array small basic.

We will read this not line per line, but as a whole array.

This is useful to know when you need to do more deep about your work. Especially when you work with folder and array.

So, in this tutorial we will learned about:
1. Reading single row multi colomn (SRMC) array
2. Reading multi row and multi colomn (MRMC) array

You know both of them is different. So, lets go.

1. Reading single row and multi colomn (SRMC) array
This is the code:
i[0] = "s"
i[1] = "a"
i[2] = "y"
i[3] = "b"
TextWindow.WriteLine(i)

The output will be:
Figure 1


2. Reading multi row and multi colomn (MRMC) array
This is the code:
i[0][0] = "s"
i[0][1] = "a"
i[1][0] = "y"
i[1][1] = "b"
TextWindow.WriteLine(i)

The output will be:
Figure 2

So, you can see, both of the output are different.

The ';' sign is for seperating colomn (like figure 1 explained) and also seperating row (like figure 2 explained).

So, the ';' sign is used both as in single row multi colomn (SRMC) array and multi row multi colomn (MRMC) array.

And, 'index\=<value>\' is used only for multi row multi colomn (MRMC) array and used only for seperating index colomn and value.

Ok, thats it. Thanks for reading.

Tidak ada komentar:

Posting Komentar