I've filed the issue as #166.
Addition and subtraction in Small Basic web IDE text string calculates?!
StephenDx
51
Reputation points
In the Small Basic web IDE, the following code outputs numbers on the left of the "=" rather than an expected string showing the calculation. Is this a bug or have I formulated my strings incorrectly?
a = 6
b = 3
result1 = Text.Append(a, " + ")
result1 = Text.Append(result1, b)
TextWindow.WriteLine(result1 + " = " + (a + b) )
result2 = Text.GetSubText(a, 1, 1) + " + " + Text.GetSubText(b, 1, 1)
TextWindow.WriteLine(result2 + " = " + (a + b) )
sum = Text.Append(a, " - ")
TextWindow.WriteLine(sum + b + " = " + (a - b) )
The result (not expected) from the web IDE is (https://superbasic-v2.azurewebsites.net/):
63 = 9
9 = 9
-3 = 3
Program has ended.
The result with the same code in the desktop IDE is as expected (Microsoft Small Basic v1.3 at time of writing):
6 + 3 = 9
6 + 3 = 9
6 - 3 = 3
Press any key to continue...
Multiplication ( *
) and Division ( /
) in both IDE's behave as expected.
Accepted answer
1 additional answer
Sort by: Most helpful
-
Nonki Takahashi 676 Reputation points
2020-10-17T02:00:08.083+00:00 Hi @StephenDx , thank you for your report. I will add this issue to GitHub. This is a new issue.