Shop OBEX P1 Docs P2 Docs Learn Events
Calculator Problem — Parallax Forums

Calculator Problem

ProcessingData...ProcessingData... Posts: 208
edited 2009-01-30 07:54 in BASIC Stamp
I have been trying to make a calculator out of my bs2, just for fun.·I got it to get the numbers from debug, (finally!), but·I can't seem to display the answer to the problems.·I can't find out what's wrong. Attached is my code, see if you can help me find the problem.confused.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Basic Stamp,···· Propeller,·· · SX,·· FUN!


START:·
>Proccessing Data. . . .··
>Task Complete. . .·.
>Saving Data. . . .
>Entering SLEEP Mode. . . .
>Signing OFF


Comments

  • metron9metron9 Posts: 1,100
    edited 2009-01-30 07:21
    enter is equal to 0 on entry not sure why i think the variable is getting clobberd in the declares not sure about this

    Your debug also if enter i=1 is outputting without formatting so it clears screen and outputs screen codes that are jibberish.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Adrian SchneiderAdrian Schneider Posts: 92
    edited 2009-01-30 07:54
    Check the Syntax of your IF-Statements/expressions:

    IF IN = "0" OR "1" OR "2" OR "3" OR "4" OR "5" OR "6" OR "7" OR "8" OR "9" THEN
    ...
    
    IF place > 8  AND IN >< "+" OR "=" THEN
    ...
    
    ELSEIF IN = "a" OR "b"OR "c" OR "d" OR "e" OR "f" OR "g" OR "h" OR "i" OR "j" OR "k" OR "l" OR "m" OR "n" OR "o" 
    ...
    
    etc.
    
    



    is completely wrong -- read the manual.

    regards
    adrian
Sign In or Register to comment.