プレイ日記
Trabajon Leyenda_17
I know I'm annoying everyone, but I'm literally trying my best to understand as the guides for programming is limited compare to other countries, and I do not want to go back to time where I didn't appreciate programming at all. So I wanna see how READ RESTORE and DATA works without making it look complex to remember. I want to try and not make this really complex like $ at the end because I get..
0そうだね
プレイ済み
返信[1]
親投稿
Trabajon Leyenda_17
... reminded that dollar sign is the Address code for 6502.
0そうだね
プレイ済み
返信[2]
親投稿
Trabajon Leyenda_17
Here's a new progress
0そうだね
プレイ済み
返信[3]
親投稿
raimondz raimondzz
You need to put data below a label. Then, use restore to put the pointer on the first data of the label. After that, use read to get the data.
0そうだね
プレイ済み
返信[4]
親投稿
raimondz raimondzz
DEF readData VAR S$ RESTORE @LAB WHILE 1 READ S$ IF S$=="" THEN BREAK ? S$ WEND RETURN @LAB DATA "h","e","l","l","o" DATA "" END readData
1そうだね
プレイ済み
返信[5]
親投稿
Trabajon Leyenda_17
Whats the point in using VAR/DIM if they are mean the same thing?... Cant complain since Im new to this... at least Im learning this.. although I need massive details on how DIM, VAR, DATA and READ like if Im 5 years old. [[You can help if you want. Just want to shout out why this similarities exist.]
0そうだね
プレイ済み
返信[6]
親投稿
Trabajon Leyenda_17
Im going to need a really good tutor that knows all of the codes; if one day I could make a youtube series about SMILEBASIC tutorial that shows every examples on one code each, to even make 5 years old to understand, I will. Leeching every single details to "Semi-document" the codes would be great..
0そうだね
プレイ済み
返信[7]
親投稿
raimondz raimondzz
DIM/VAR let you declare a variable. This sentence is useful when you create a function with DEF because the variable you use is based on the context. Example: 'Global variable VAR X$="WORLD" DEF showX VAR X$="HELLO" 'Varible that exist only inside showX ? X$; END showX ? X$
1そうだね
プレイ済み
返信[8]
親投稿
Trabajon Leyenda_17
So DIM/VAR is the same thing as "A = B-C" ? But for letters only [no numbers allowed like $ effect], or both allowed?]
0そうだね
プレイ済み
返信[9]
親投稿
raimondz raimondzz
Nope, VAR/DIM is used for every kind of variable(Number, strings or array). The difference with A=B-C is that your example is an implicit declaration of the variables meanwhile DIM/VAR do a explicit declaration.
0そうだね
プレイ済み
返信[10]
親投稿
raimondz raimondzz
Anyway, this sentence is useful if: - You want to keep track what variables you're using. - You're using DEF. In this case the use of DIM/VAR is required to create variables on the scope of the function. - You're using option STRICT. In this case, you must use DIM/VAR because the implicit declaration is disabled.
1そうだね
プレイ済み
返信[11]
親投稿
Trabajon Leyenda_17
My failed attempt to "PRINT-DRAW" using DATA READ.
0そうだね
プレイ済み
返信[12]
親投稿
12Me23 12Me23
What you should do is something like: DEF COLORING VAR DRAW$="■▦ etc." RESTORE @DRAW WHILE 1 READ TEMP IF TEMP==-1 THEN BREAK PRINT DRAW$[TEMP] WEND @DRAW DATA 1,1,1,1,1,1,1,0,0,0,0,1 DATA 5,4,3,2,1,3,3,2,3,-1 END Also: DIM and VAR are identical, but usually people use DIM for arrays and VAR for other variables.
0そうだね
プレイ済み
返信[13]
親投稿
Trabajon Leyenda_17
Doesn't seem working.. Explain each code details [if you want] please. Where did the TEMP comes from?
0そうだね
プレイ済み