@@ -599,7 +599,8 @@ err_Handler:
599599 BuildErrMessage errEvalError, d_lCurly & fName & d_rCurly & " | Error#: " & err.Number & d_Space & _
600600 d_lParenthesis & err.Description & d_rParenthesis
601601End Function
602-
602+ '#############################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####################################################################
603+ '#############################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####################################################################
603604''' <summary>
604605''' Returns an array containing two elements: assignments and expression to be evaluated.
605606''' The expression to be evaluated must comply with the premise that all assignments are made
@@ -696,7 +697,24 @@ Private Function AbstractValidate(strAssignments As String) As Boolean
696697 Loop While i <= L And tmpResult
697698 AbstractValidate = tmpResult
698699End Function
699-
700+ ''' <summary>
701+ ''' Returns an array containing all lines from a given ASF script file.
702+ ''' </summary>
703+ Public Function ReadASFfile (filePath As String ) As String ()
704+ Dim FileHandled As Long
705+ Dim fLen As Long
706+ Dim Buffer As String
707+
708+ FileHandled = FreeFile
709+ Open filePath For Binary As #FileHandled
710+ fLen = LOF(FileHandled)
711+ Buffer = Space$(fLen)
712+ Get #FileHandled, , Buffer
713+ Close #FileHandled
714+ ReadASFfile = Split(Replace(Trim(Buffer), vbCr, vbNullString), vbLf)
715+ End Function
716+ '#############################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####################################################################
717+ '#############################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####################################################################
700718Private Function aCeiling (ByRef expression As String , ByRef fName As String ) As String
701719 On Error GoTo err_Handler
702720 aCeiling = CStr(Ceiling(CDbl(expression)))
0 commit comments