On Oct 10, 2006, at 10:13 PM, Norman Palardy wrote:


On Oct 10, 2006, at 9:28 PM, Robert Poland wrote:

Hi,

I would like to learn how to pass a variable to a method and use it in the method. The users guide seems to imply that it can be done but doesn't explain it very well.


 sub sample1(someInteger as integer)

    if someInteger > 0 then
        msgbox "someinteger is > 10"
    else
        msgbox "it's not"
    end if
 end sub


anywhere else you just do


    dim someValue as integer

    somevalue = 12

    sample1(somValue)
        

not much more sophisticated than that

Norman,

Thanks, that got me going. The line "sub sample1(someInteger as integer)" was not clear to me. I figured that "someInteger as integer" had to go somewhere then found that it was a parameter to be placed in the closed (by default) part of the Method window.

Robert Poland
[EMAIL PROTECTED]



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to