プレイ日記
Scientist Speedy1101
Vector arrays don't exist in SmileBASIC, do they?
3そうだね
プレイ済み
返信[1]
親投稿
Darkcon SGMXZYDarkcon354
I would say not it basic not object or c++ or java.
0そうだね
プレイ済み
返信[2]
親投稿
Scientist Speedy1101
They do exist in C++. I'm still having a little difficulty understanding how to use them though.
0そうだね
プレイ済み
返信[3]
親投稿
Alex MrCashews
A vector array as in an array that can be resized? Yes, it technically DOES exist. The PUSH command adds an element onto the end of an array, and the POP function removes the last element and returns it. UNSHIFT and SHIFT do the same thing, except at the start. These actions resize the array as well. Remember this ONLY works on 1D arrays. Example: DIM A$[0] PUSH A$,"HELLO!" PRINT POP(A$)
1そうだね
プレイ済み
返信[4]
親投稿
Scientist Speedy1101
Oh, so that's what those do. I was about to ask that, but now I don't have to. Thanks!
0そうだね
プレイ済み
返信[5]
親投稿
Darkcon SGMXZYDarkcon354
ok if that right, then I should be able to read from a 2D array and push or pop to a 1d array for X and 1D array for y right if i got what your saying, right?
0そうだね
プレイ済み
返信[6]
親投稿
Scientist Speedy1101
Are you talking to Alex or me?
0そうだね
プレイ済み
返信[7]
親投稿
Alex MrCashews
You can't POP values off of a 2D array. All of these things work on 1D only.
0そうだね
プレイ済み