anthonykulesa
Programmer
I am having some trouble getting my UDT variables to be modified by functions. Maybe Im doing something wrong? Here is the code Im using to test it. Its supposed to output 1 2 but it outputs 1 1.
type myType
x as integer
endtype
global myVar as myType
myVar.x = 1
print myVar.x
increase(myVar)
print myVar.x
wait key
end
function increase( t as myType )
t.x = t.x + 1
endfunction
any help is greatly appreciated.
type myType
x as integer
endtype
global myVar as myType
myVar.x = 1
print myVar.x
increase(myVar)
print myVar.x
wait key
end
function increase( t as myType )
t.x = t.x + 1
endfunction
any help is greatly appreciated.