Results 1 to 4 of 4

Thread: returning multiple result trough a function?

  1. #1

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179

    returning multiple result trough a function?

    Hi
    Does anyone here knows the best way to return multiple result trough a function?

    The two ways i know is to pass the value byref or putting the result of the function in properties, is there any better way to do this?

    Thanks

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    yea

    ur function can return a structure or an array

    hope it helps

    \m/\m/

  3. #3

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi thanks for the reply!

    But can anyone please show me how to return a structure to the calling object in a class whithout directly exposing the structure


    Thanks

  4. #4
    Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    45
    Public Structure personal
    dim name as string
    dim age as integer
    end structure

    private sub GetPersonal()
    dim Mypersonal as new personal

    Mypersonal=LoadPersonal()
    end sub

    private function LoadPersonal() as personal
    dim k as new personal

    with k
    .name="Jason"
    .age=23
    end with
    return k
    end function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width