Small Basic - When is an Equal Sign (=) a comparison?
When an equal sign (=) appears in a logical expression, it means it’s a comparison, not an assignment. For example, check out the code below:
If (num = 0) Then
' The rest of your life-changing code
EndIf
The first statement doesn’t change the value of the variable num to 0. It just tests the value of num against 0 and lets you know whether the answer’s true or false.
You can learn more about Small Basic over at https://blogs.msdn.com/smallbasic.
Small and Basically yours,
- Ninja Ed & Majed Marji
Comments
- Anonymous
January 31, 2016
Computers Today (part 1 of 6) blogs.msdn.com/.../computers-today.aspx ..... CS SPOTLIGHT: Girls in computer programming... why it matters!!! blogs.msdn.com/.../cs-spotlight-girls-in-computer-programming-why-it-matters.aspx ... Computational Thinking - Videos & Papers by Jeannette Wing blogs.msdn.com/.../computational-thinking-videos-amp-papers-by-jeannette-wing.aspx