Enhanced mode test PHP + #
What does ENHANCED MODE do?
PHP Code:
[CODE]
' This function makes a string of a specified number of a specified character e.g.
' a string of five dots "....." etc.
Public Function MakeStringOf(ByVal p_strChar As String, ByVal p_lngCount As Long) As String
Dim strReturn As String
' Check that the input character is not a blank string
' and that the length is not less than 0
If (p_strChar = "") Or (p_lngCount <= 0) Then
strReturn = ""
Else
' Make a string of spaces of the specified size
strReturn = Space(p_lngCount)
If (p_strChar <> " ") Then
' Replace all of the spaces with the specified character.
strReturn = Replace(strReturn, " ", p_strChar)
End If
End If
' Return the new string.
MakeStringOf = strReturn
End Function
[/CODE]
Can anyone tell me how to get this to be VB colours rather than red comments?
Re: Colour test for VB Code
inside a code segment...
Code:
' This function makes a string of a specified length containing the specified characters.
This function avoides the need for loops
Public Function MakeStringOf(ByVal p_strChar As String, ByVal p_lngCount As Long) As String
Dim strReturn As String
' Check that the character is not blank and the length is greater than zero
If (p_strChar = "") Or (p_lngCount <= 0) Then
strReturn = ""
Else
' Make a string of spaces of the required length
strReturn = Space(p_lngCount)
If (p_strChar <> " ") Then
' Replace the spaces in the string with the specified character
strReturn = Replace(strReturn, " ", p_strChar)
End If
End If
MakeStringOf = strReturn
End Function