Results 1 to 9 of 9

Thread: whats the difference between an OUT and REF param?

  1. #1

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

    whats the difference between an OUT and REF param?

    . ..anyone?

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Out paramaters do not have to be initialized before they are passed in to the function. The function will take care of initializing the variable(s).

  3. #3

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    so ref rule the out's or no?

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    ref is the equivalent to ByRef in VB.NET. Its used to pass variables by reference instead of the default by value.
    Dont gain the world and lose your soul

  5. #5
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    out is the same as ref except that the compiler will allow you to initiallize the variable in the called method instead of prior to it...
    -scott
    he he he

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    out is the same as ref except that the compiler will allow you to initiallize the variable in the called method instead of prior to it...
    This is what I said...

  7. #7
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    Out paramaters do not have to be initialized before they are passed in to the function. The function will take care of initializing the variable(s).
    ...actually, this is what you said...
    -scott
    he he he

  8. #8
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Smart azz....

  9. #9
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Talking

    -scott
    he he he

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