Discussions

SmileBASIC Community

GillsNintendrew97

04/04/2016 2:13 PM ·Spoilers

Open Closed

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

Advertisement

Comment

This post has no comments.

  • SB is a modified version of basic

    Yeahs0
    Played
  • 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...

    Yeahs1
    Played
  • about the refrence guide same, I dont work in basic. I work in sb and lua so...idk what needs to be transalated.

    Yeahs0
    Played
  • 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.

    Yeahs0
    Played
  • Ed

    04/04/2016 4:19 PM ·Spoilers

    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.

    Yeahs1
    Played
  • Ed

    04/04/2016 4:23 PM ·Spoilers

    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 '<>'.

    Yeahs1
    Played
  • Ed

    04/04/2016 4:26 PM ·Spoilers

    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.

    Yeahs1
    Played
  • Ed

    04/04/2016 4:30 PM ·Spoilers

    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

    Yeahs3
    Played
  • Ed

    04/04/2016 4:33 PM ·Spoilers

    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.

    Yeahs2
    Played
  • Ed

    04/04/2016 4:47 PM ·Spoilers

    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.

    Yeahs2
    Played
  • 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?

    Yeahs0
    Played
  • Ed

    04/04/2016 6:55 PM ·Spoilers

    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.

    Yeahs1
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-BXM-ZM9B-TFG-64XJ

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: