Avatar of mmitchell57
mmitchell57

asked on 

VBScript array reversal

I am working within an ASP page. The scripting on the page is via VBScript. I was curious if there was an already defined function within VBScripting to reverse the data in an array.

I already have a reversal in mind if there isn't. I was just hoping there was to save processing time for the page.  The code I am using is below.
<%
               Dim stmReadLine As Stream
               stmReadLine = File.OpenRead(Server.MapPath("Journal.txt"))
               Dim stmrReadLine As StreamReader = New StreamReader(stmReadLine, System.Text.Encoding.ASCII)
               stmrReadLine.BaseStream.Seek(0, SeekOrigin.Begin)
               While (stmrReadLine.Peek() > -1)
                   Dim astrMessage = Split(stmrReadLine.ReadLine(), "+")
                   Response.Write("<tr><td>" & astrMessage(0) & "</td>" & _
                                   "<td>" & astrMessage(1) & "</td>" & _
                                   "<td>" & astrMessage(2) & "</td>" & _
                                   "<td>" & astrMessage(3) & "</td></tr>")
               End While
               stmrReadLine.Close()
            %>

Open in new window

VB Script

Avatar of undefined
Last Comment
mmitchell57

8/22/2022 - Mon