Private Sub GetVBTokenSample() ' Print some samples of the GetVBToken function. Dim strLine As String strLine = " ' This is a comment-only line.": GoSub One_GetVBTokenSample strLine = " ' This line contains a copyright notice.": GoSub One_GetVBTokenSample strLine = " 'Note: This line represents a flag.": GoSub One_GetVBTokenSample strLine = " Beep: Beep: Beep ' Beep three times.": GoSub One_GetVBTokenSample strLine = " BeepStr = ""This is a 'string literal.'""": GoSub One_GetVBTokenSample strLine = " BeepStr = ""This is a 'string literal.'"" ' ... followed by a comment.": GoSub One_GetVBTokenSample strLine = " BeepStr = ""This is a """"'string literal'"""" with embedded quotes.": GoSub One_GetVBTokenSample strLine = " Global Const sSome = ""This is a test.""": GoSub One_GetVBTokenSample strLine = " Global Const dSome = &H0ffdc : Dim iOne As Integer, dOne as Integer, vOne": GoSub One_GetVBTokenSample Exit Sub One_GetVBTokenSample: Debug.Print Do Until strLine = "" Dim strToken As String strToken = GetVBToken(strLine) Debug.Print strToken & " ||| " & strLine Loop Return End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.