marco
New Member
Easy programmer.
Posts: 12
|
Post by marco on May 17, 2020 3:14:33 GMT -5
|
|
marco
New Member
Easy programmer.
Posts: 12
|
Post by marco on May 17, 2020 3:41:07 GMT -5
Ok, I did something wrong, but the errors?
this works better: ' rekenmachine / calculator print "De bedoeling is dat je 2 getallen kunt invoeren" print "Getallen 1 en 2 en dat je met rekentekens als " print "+,-,/,* een berekening kunt doen. Simpel, maar " print " In de meeste gevallen voldoende " input "Voer een getal in : "; getal1 ' input "Voer een getal in : "; getal2 ' input " Voer het rekenteken in : "; rekenteken$
if rekenteken$ = "+" then print "De uitkomst van " + str$(getal1) + " " + rekenteken$ + " " + str$(getal2) + " = " + str$(getal1 + getal2) end if
|
|
marco
New Member
Easy programmer.
Posts: 12
|
Post by marco on May 17, 2020 7:06:15 GMT -5
I got some errors while opening files and saving them but that error is gone.
|
|
|
Post by Carl Gundel on May 17, 2020 11:45:31 GMT -5
LB5 right? Please post your LB5 questions in the forum section for LB5, just to avoid confusion. LB should be logging errors, but I've noticed it isn't doing that, so let me look into it. -Carl
|
|
|
Post by Carl Gundel on May 17, 2020 11:47:48 GMT -5
Ok, I did something wrong, but the errors? this works better: ' rekenmachine / calculator print "De bedoeling is dat je 2 getallen kunt invoeren" print "Getallen 1 en 2 en dat je met rekentekens als " print "+,-,/,* een berekening kunt doen. Simpel, maar " print " In de meeste gevallen voldoende " input "Voer een getal in : "; getal1 ' input "Voer een getal in : "; getal2 ' input " Voer het rekenteken in : "; rekenteken$
if rekenteken$ = "+" then print "De uitkomst van " + str$(getal1) + " " + rekenteken$ + " " + str$(getal2) + " = " + str$(getal1 + getal2) end if If you have code that produces a surprising result, please post it.
|
|
|
Post by Gordon Rahman on May 17, 2020 16:09:01 GMT -5
Wow, why haven't I placed this question? We always make statements for LB to compile ....like X=5 y=sqr(81) C = log(100) and so on. I never got the idea to ask (make a statement like) A = input T nice, now I know that LB5 can't compile that but back than I should have tested this...
|
|
|
Post by Carl Gundel on May 18, 2020 9:23:15 GMT -5
Wow, why haven't I placed this question? We always make statements for LB to compile ....like X=5 y=sqr(81) C = log(100) and so on. I never got the idea to ask (make a statement like) A = input T nice, now I know that LB5 can't compile that but back than I should have tested this... Hey Gordon, I'm confused. What do you mean by A = input T ?
|
|
|
Post by Gordon Rahman on May 18, 2020 13:23:34 GMT -5
Hello Carl, I was confused ... the OP posted (can be seen in the YouTube) that LB5 just said compiled and then rejected to run the code. So I wondered why I never came to the idea to test any BASIC-language computer program in that way. ... so I did it now, and of course LB and LB5 will just say SYNTAX ERROR as expected. Gordon
|
|
|
Post by Carl Gundel on May 18, 2020 14:36:45 GMT -5
Hello Carl, I was confused ... the OP posted (can be seen in the YouTube) that LB5 just said compiled and then rejected to run the code. So I wondered why I never came to the idea to test any BASIC-language computer program in that way. ... so I did it now, and of course LB and LB5 will just say SYNTAX ERROR as expected. Gordon I did see it compile input(str$), but that's clearly a bug. The compiler should have complained.
|
|