Am Dienstag, 2. September 2008 16:35:47 schrieb Benoit Minisini:
>
> The ByRef feature was mainly added to help people porting VB project.
>
> It does not work by passing pointers, but by keeping the value of the
> argument when the function ends, and put it into the expression passed
> ByRef.
>
>
On mardi 02 septembre 2008, [EMAIL PROTECTED] wrote:
> Am Dienstag, 2. September 2008 12:06:09 schrieb Emil Tchekov:
> > Forgot to gave you example (VB)
> >
> >
> > sub main()
> >
> > dim a as integer
> >
> > a=1
> >
> > debug.print a, pr1(a)
> > debug.print a, pr2(a)
> > debug.
Am Dienstag, 2. September 2008 12:06:09 schrieb Emil Tchekov:
> Forgot to gave you example (VB)
>
>
> sub main()
>
> dim a as integer
>
> a=1
>
> debug.print a, pr1(a)
> debug.print a, pr2(a)
> debug.print a
>
> end sub
>
>
> private sub pr1(byval a)
>
> a=2
>
>
Forgot to gave you example (VB)
sub main()
dim a as integer
a=1
debug.print a, pr1(a)
debug.print a, pr2(a)
debug.print a
end sub
private sub pr1(byval a)
a=2
return a
end sub
private sub pr2(byref a)
a=2
return
Hello Stevie,
If this is similar to the ByRef from VB, there is following to be said:
In Subroutine or Function that expects parameters passed from other part of
your program there are two possibilities to pass them
By Value (ByVal) or by Reference (ByRef).
First one means that your Sub gets on