locked
Syntax issue RRS feed

  • Question

  • One of the things that I have noticed with Small Basic is it seems to come out with the error message: "The program has encountered an error and needs to close" very frequently.  When I see that it makes me shudder.  Here's an example that will definitely give that error.

    While "True"
    a=Flickr.GetRandomPicture("Mountain"")
    GraphicsWindow.DrawImage(0,0,a)
    EndWhile

    The reason is in the GraphicsWindow line.  The a at the end should be on the left instead of the right.  The line is not properly constructed and I would think should give a syntax error, but it doesn't.  These types of errors occur very often when trying to write a program.  A person might miss putting in a parenthesis, put something backwards, etc.  Generally it's fatal.  The program gets closed and you lose what you are doing.  I know they are saying "You should save your program before running it".  Who actually does that?

    Is there a way for when issues like this do occur to avoid having the program close?  I don't see why it would want to do that and it would prevent losing a person's current work.  Also, it would be really nice if it could come back and tell what is really wrong?  Sometimes a person can spend hours figuring out just figuring what little syntax error is really there with the program crashing all the time.

    Thanks,

    Jricestk
    Thursday, February 12, 2009 12:22 AM
    Answerer

Answers

  • Jricestk, 

    Just to clarify, the crash happens on the program that you're trying to run - and not on the Small Basic Environment, right?  So technically, the person isn't losing the current work (if work means the program).

    That said, you're absolutely right about the experience we have now when programs crash.  It's ugly and there could be a lot done to make this experience better.  I'll take a note and work on this for the next release.

    Vijaye
    Thursday, February 12, 2009 12:29 AM