'==========================================================================
'
' VBScript:  AUTHOR: Student , msft,  7/1/2006
'
' NAME: <filename>
'
' COMMENT: Key concepts are listed below:
'1.ForMatText is used to underline a line of output.
'2.Pass a value to the function. ForMatTxt("sample")
'3.It will grow or shrink the length of the underline as it
'4.uses the LEN function to determine line length.
'==========================================================================
WScript.echo ForMatTxt("This is a sample line.")


' ***** function is below ******
Function ForMatTxt(lineOfText)
Dim numEQs
Dim separator
Dim i
numEQs = Len(lineOfText)
	For i = 1 To numEQs
		separator = separator & "="
	Next 
	ForMatTxt = lineOfText & vbcrlf &separator & vbcrlf
End Function