Returning Object Arrays


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Returning Object Arrays

  1. #1
    Join Date
    Dec 2005
    Posts
    12

    Returning Object Arrays

    Hello,

    I have (what I believe is) a simple syntax issue wrt returning user-defined object arrays:

    Say I have a class clsGx that I am implementing as an array Gx(maxIndices):

    And say, after population, I want to pass it to a function that returns another array of clsGx instances (Gx2(maxIndices))as follows

    Set Gx2 = exch(Gx)

    With exch being defined as follows:

    Private Fuction exch(Gx() As clsGx) as clsGx
    ...
    End Function


    Currently, I am receiving a compile errors including can't assign to array. Any suggestions?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    you forgot the last couple of parenthesis (the function is returning an array):

    Private Fuction exch(Gx() As clsGx) as clsGx()

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Similar Threads

  1. Replies: 2
    Last Post: 07-05-2002, 01:29 PM
  2. Replies: 0
    Last Post: 05-08-2002, 09:22 AM
  3. Validating XML
    By Jaco de Villiers in forum XML
    Replies: 1
    Last Post: 06-01-2001, 06:50 PM
  4. Returning arrays from object?
    By Mike in forum ASP.NET
    Replies: 0
    Last Post: 07-07-2000, 06:39 AM
  5. Re: COM object Password Security
    By Tom Shreve in forum Enterprise
    Replies: 0
    Last Post: 04-07-2000, 09:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center