Fixed width tags are useful as they allow text to appear exactly as you wish. Normally extra spaces are stripped away, but in fixed width text everyting is preserved. This also allows text to aligned precisely on adjacent rows. There are two ways this can be done.
- The [ tt ] tag is ideal for posting a span of fixed width text, or producing diagrams that require a "matrix" arrangement.
- The [ code ] tag is better suited for posting programming code as the default view is only the first three lines. It is necessary to click "Expand" to view the full section.
[ tt ]
1 2 3
4 5
6[ / tt ]produces
1 2 3
4 5
6
Example 2 (code tag)[ code ]
'Display the 20th Fibonacci number on the console Dim intLoop, intF(20) As Integer intF(1) = 1 intF(2) = 1 For intLoop = 3 to 20 intF(intLoop) = intF(intLoop - 1) + intF(intLoop - 2) Next intLoop Console.WriteLine(intF(20))[ / code ]
produces
Code: Select all
'Display the 20th Fibonacci number on the console
Dim intLoop, intF(20) As Integer
intF(1) = 1
intF(2) = 1
For intLoop = 3 to 20
intF(intLoop) = intF(intLoop - 1) + intF(intLoop - 2)
Next intLoop
Console.WriteLine(intF(20))