Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2005, 11:41 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default error when sorting an Array of Array

Hi,
Okay I'm using FSO to fetch documents and write then into a table for retreival (my filenames are hyperlinks, too).

I want to add the additional functionality of sorting these results as well.

I was once given a link to a peice of code and while it looks like it might work I'm still having VB sript erros and I am VERY new to VBs.
Here's the error
*******************************
Expected end of statement

/HR/comm_employee.asp, line 240

Dim the Files ( )

*******************************
Here's the code where the error is found:

************************************************** **************

' collect all the info about each file and put it into one
' "slot" in our "theFiles" array.
For Each fileItem in curFiles
    fname = fileItem.Name
    fext = InStrRev( fname, "." )
    If fext < 1 Then fext = "" Else fext = Mid(fname,fext+1)
    ftype = fileItem.Type
    fsize = fileItem.Size
    fcreate = fileItem.DateCreated
    fmod = fileItem.DateLastModified
    faccess = fileItem.DateLastAccessed
    currentSlot = currentSlot + 1

    If currentSlot > UBound( theFiles ) Then
        ReDim Preserve theFiles( currentSlot + 99 )
    End If
    ' here's an array!
    theFiles (currentSlot) = Array' And now a loop for the files

Dim the Files ( )
ReDim theFiles( 500 ) ' arbitrary size!
currentSlot = -1 ' start before first slot(fname,fext,ftype,fsize,fcreate,fmod,faccess)
Next

************************************************** **************

As always your help is most appreciated,
nancy
Reply With Quote
  #2 (permalink)  
Old February 16th, 2005, 12:44 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Which line is 240?


mmcdonal
Reply With Quote
  #3 (permalink)  
Old February 17th, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your feedback. The problem is resolved.

Thanks again,
nancy
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Array in C++ code_lover C++ Programming 4 October 16th, 2008 01:43 AM
Sorting 2 dimensional array rgalehouse Javascript How-To 2 December 2nd, 2006 10:46 AM
sorting two dimensional array erin VBScript 0 February 10th, 2004 05:55 PM
Array Sorting Dinesh22 VB.NET 2002/2003 Basics 2 February 3rd, 2004 11:19 AM
Sorting an array roxusername PHP How-To 1 October 14th, 2003 01:16 PM



All times are GMT -4. The time now is 08:07 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.