Small Basic - "True" String


As it turns out, Small Basic gives a special treatment to the string "True". In Small Basic, the strings "True", "true", and "TRUE" are the same (even though they have different cases)! The next code snippet shows you how Small Basic treats “True”.

 

Copy this code into Small Basic:

If ("True" = "TRUE" Then 

TextWindow.WriteLine("You'll see this string") 

EndIf    

If ("False" = "FALSE" Then 

TextWindow.WriteLine("You'll NOT see this string")  

EndIf

 

In other words, "True" is case insensitive (all casings mean the same thing), but other strings (like "False") are case sensitive!

 

To learn more about Small Basic, head to http://blogs.msdn.com/SmallBasic

 

Small and Basically yours,

   - User Ed & Majed Marji

Comments (1)

  1. 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

Skip to main content