Small Basic: How to Format a Code Block

This article is especially for the person who's writing Small Basic articles on TechNet Wiki (but this also works for the forums).  This article explains the Code Block Generator v1.3
 
There is a menu icon of [Format Code Block] to generate code block in TechNet Wiki [EDIT] menu bar.

This [Format Code Block] tool shows following popup window.  But there is no option to select the Small Basic programming language.

 So, we need another tool to generate a Small Basic code block.  The Small Basic program ID SKC235-1 is a tool for that.

Usage of this tool is almost the same as TechNet Wiki's [Format Code Block].  If you click the [OK] button, you will see the following window:

And copy this code block and paste with [PasteHTML] button into TechNet Wiki [EDIT] screen.  Then you get the following code block:

' Sample Program
For i =  1 To 10
  TextWindow.Write(i + " ")
EndFor
TextWindow.WriteLine("")

History of Code Block Generator

v1.3 (SKC235-1) - explained in this article.
v1.4 (SKC235-2) - string and number colors are distinguished.
Known issues still alive in v1.4:

  • Hang up at a line ended with CR (0x0D) or LF (0x0A) only.  Newline should be CR+LF.
  • A name started with a keyword is colored as the keyword partially.
  • Created HTML code collapses in some site (e.g. MSDN Blog) because of "</CODE" + CRLF + ">".  To avoid this issue, remove CRLF in "</CODE>" before pasting to such sites.

See Also

Other Languages