Blog Archives

Syntax highlighter, Plugin for posting Source Code

I added “SyntaxHighlighting” functionality. Here is an example of Visual Basic code. All the information for using it on WordPress you can find on the following links:

Information to install and use “SyntaxHighlighter” on Bloger blogs is here:

Function NextWBS(iLevel As Long, sLastWBS As String, nDigits As Long) As String
'Stevilcenje z 0
    Dim asWBS() As String

    asWBS = Split("." & sLastWBS, ".")

    If iLevel = 0 Or iLevel > UBound(asWBS) + 1 Then
        NextWBS = "#LEVEL!"
        Exit Function
    End If

    ReDim Preserve asWBS(0 To iLevel)

    'Ce sem v novem nivoju, postavim to vrednost na 0.
    If Len(asWBS(iLevel)) = 0 Then
        asWBS(iLevel) = "0"
        asWBS(iLevel) = Format(CLng(asWBS(iLevel)), String(nDigits, "0"))
    Else
        asWBS(iLevel) = Format(CLng(asWBS(iLevel)) + 1, String(nDigits, "0"))
    End If

    NextWBS = Mid(Join(asWBS, "."), 2)
End Function