トピック
Voxridian Nintendrew97

Please read my program?

Reading a Wikibook on learning BASIC, and the first few parts made sense, but then it just stopped teaching and starting throwing stuff like this at me. What did I write wrong here? It says Syntax error in 0:5, which I get, sorta. Idk what these mean beside a few commands 'cause it didn't teach me any of these! I'll can tell you the wiki I read if it'll help
13そうだね
プレイ済み
返信[1]
親投稿
PikaRyan papermariofanmm
SB is a modified version of basic
0そうだね
プレイ済み
返信[2]
親投稿
Voxridian Nintendrew97
So which commands need to be retranslated for SB? The $ needs rewording, huh? And Loop... I wish there was a reference guide to tell me what command words and letters were modified...
1そうだね
プレイ済み
返信[3]
親投稿
PikaRyan papermariofanmm
about the refrence guide same, I dont work in basic. I work in sb and lua so...idk what needs to be transalated.
0そうだね
プレイ済み
返信[4]
親投稿
Voxridian Nintendrew97
Hm... That sucks :( why wouldn't they just use regular basic..? I'm not even sure what this program I'm working on is even suppose to do, other than by guessing it has to do with answering how many of a number I want in stars? :/ Thank you for answering, now I know what Im reading has to be retranslated for SB. Now just to figure out how to work around it... And to make thing prog work.
0そうだね
プレイ済み
返信[5]
親投稿
Ed CPFace
Line 1: If you put two commands on the same line, you need to separate them with a colon. Line 2: There is no "DO - LOOP" structure in SmileBASIC - you either need to use "WHILE - WEND" or "REPEAT - UNTIL". I changed both of these loops to REPEAT loops because the condition statement was put at the end. Line 4 - This line isn't needed because line 5 will do all the work.
1そうだね
プレイ済み
返信[6]
親投稿
Ed CPFace
Line 5 - SmileBASIC uses a completely different syntax to repeat a string. You can multiply a string by any number to repeat it that many times. Line 7 - Changed your DO to a REPEAT again. Line 9 - The keyword LOOP isn't used. The sign for Not Equal is '!=' rather than '<>'.
1そうだね
プレイ済み
返信[7]
親投稿
Ed CPFace
Line 10 - LOOP is removed again. SmileBASIC does not have an equivalent to the UCASE$ function, but it's usually not necessary anyway. Since the condition was changed from WHILE to UNTIL, I inverted the comparison to check for when ANSWER$ does NOT contain a Y. Line 11 - Added a colon again.
1そうだね
プレイ済み
返信[8]
親投稿
Ed CPFace
Although SmileBASIC is similar enough to other kinds of BASIC that people who are already familiar with the language can pick it up more quickly, it's different enough that you won't get very far by trying to learn it using learning guides designed for other forms of BASIC. You're better off going through the instruction manual that comes with the program, particularly the first four sections in
3そうだね
プレイ済み
返信[9]
親投稿
Ed CPFace
Introduction to BASIC, then going online to smilebasic.com and browsing through the complete Instruction List and seeing if you can learn the commands one at a time. I wish I could offer you more help, but I've been playing with BASIC for over 30 years. Miiverse isn't a good place to try and transfer that kind of knowledge.
2そうだね
プレイ済み
返信[10]
親投稿
Ed CPFace
As for why they don't use regular BASIC... For one thing, almost every system implements BASIC slightly differently, so although there are similarities, there isn't one definitive BASIC. But the changes in SmileBASIC are mostly conveniences for modern programmers and optimizations to make it easier to use the 3DS's features.
2そうだね
プレイ済み
返信[11]
親投稿
Voxridian Nintendrew97
Well this is interesting xD Thank you so much, Ed! You gave a lot of in-depth help, and although I'm still trying to learn what most of these mean, I'm eager to learn, so I will see the main site about those instructions. I replicated what you did, but it seems to send my name over a hundred times after asking if I want more stars, I must've missed something xD btw, why was Line 4 skipped to 5?
0そうだね
プレイ済み
返信[12]
親投稿
Ed CPFace
Line 4 sets STARS$ to an empty string. It's not necessary because line 5 just sets it to some number of stars. Your name gets repeated like that because the PRINT statement is in a FOR-NEXT loop that repeats 200 times.
1そうだね
プレイ済み