Connecting Tech Pros Worldwide Forums | Help | Site Map

Assigning varibles by referance

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 11 '09
I want to pass the referance to a variable around, how do I do that?

(unit is a complex object I made, and wondering about more complex data types)
dim unit1 as new unit
dim unit2 as new unit
dim unit3 as new unit

unit1=1
unit2=2
unit3= byref unit2
unit3 += unit1

'now unit2 should =3

I know this doesn't work...but it should show what I WANT to do....I want to pass the refeance to varibles around since the variable I want to change is well, variable.
This is also a gross oversimplification of what I'm trying to do so I don't have to post hundreds of lines of code...

Reply