トピック
Jacob KulcakKid4

Arrays

What is an array? it dosen't say anything about them in the manual.
1そうだね
プレイ済み
返信[1]
親投稿
Aaron Krondelo
Just a variable that holds multiple values. DIM A[4] //create var 'A' with a size of 4. Array indexing starts at 0 so the total size is N-1. A[0]=1:A[1]=3:A[2]=7:A[3]=9 // Now if you did X=A[1]*A[2] X now equals 21.
0そうだね
プレイ済み
返信[2]
親投稿
OlOOlOOl pi_r_round
A variable is like a sheet of paper that's been assigned a name (like MONEY, HEALTH, AMMO). You can write & read a different data (number or letter) on each sheet and reference the data by using the name assigned to the sheet. An array is like a booklet of those sheets that are referenced by booklet name and page number. TREASURE[5] would be for page 5 of the booklet named TREASURE.
1そうだね
プレイ済み
返信[3]
親投稿
Jacob KulcakKid4
thanks for the information @Aaron and @OIOOIOOI. also, is a string a type of variable?
0そうだね
プレイ済み
返信[4]
親投稿
OlOOlOOl pi_r_round
Yes it is. Variables with a "$" at the end of their name (such as NAME$) hold strings. Those without, hold numbers.
0そうだね
プレイ済み
返信[5]
親投稿
Aaron Krondelo
Furthermore, you can have an array of strings. DIM A$[5]
0そうだね
プレイ済み
返信[6]
親投稿
Jacob KulcakKid4
Thanks again for the info. I'm closing this discussion now.
0そうだね
プレイ済み