プレイ日記
nate NJR1432
Hello people of SB! You might remember me, probably not... but anyways i have come to ask a question. Could anyone explain the DIM function to me? thanks to anyone who helps!
4そうだね
プレイ済み
返信[1]
親投稿
dfrost 4311df
it defines either arrays, or variables(arrays contain data of up to 4 dimensions) examples of DIM DIM VARIABLE DIM ARRAY[w,h,l] it stores data in a certain order
1そうだね
プレイ済み
返信[2]
親投稿
dfrost 4311df
use arrays for things like map data or save data.
1そうだね
プレイ済み
返信[3]
親投稿
nate NJR1432
thanks!
0そうだね
プレイ済み
返信[4]
親投稿
Aaron Krondelo
Don't limit yourself by only using them for maps/saves. They are very useful as they are not fixed size, and can be directly iterated through loops.
0そうだね
プレイ済み
返信[5]
親投稿
Levi LeviJS
Let me know if this helps
0そうだね
プレイ済み
返信[6]
親投稿
Levi LeviJS
with the code I posted you could do something like FOR I=0 TO LEN(X)-1 SPSET I,1+I:SPOFS I,X[I],180 NEXT to place multiple sprites, etc. There's plenty you can do with DIM
1そうだね
プレイ済み
返信[7]
親投稿
nate NJR1432
that did help levi! i just saw this...
1そうだね
プレイ済み
返信[8]
親投稿
Levi LeviJS
better late than never! gladit was useful for you
1そうだね
プレイ済み
返信[9]
親投稿
nate NJR1432
hey! I think im starting to understand more. Could you possibly explain a simple program you could use DIM in?
0そうだね
プレイ済み
返信[10]
親投稿
ЩMr.Mo14 mr.mo14
acls:input "file: ",A$ dim numbers[0],b load "dat:"+A$,numbers for i=0 to len(numbers)-1 inc b,numbers(i) next ?b
1そうだね
プレイ済み
返信[11]
親投稿
ЩMr.Mo14 mr.mo14
loads a data file and displayes the sum of the data.
1そうだね
プレイ済み
返信[12]
親投稿
nate NJR1432
hey thanks!
1そうだね
プレイ済み