Hi,
My object oriented skills are lacking so I can't figure this variable problem out.
Here is the simplified code and output.
dim x as integer
dim y as integer
x = 1
xfixed = x
do
call dothiswork(x)
" inside dothiswork procedure the value x passed into it can increment to a number, for example 20)
when I come out of this procedure the value for x = 20 and now it will pass into the next procedure (dothisotherwork) as 20 when I
really want is to pass in original value 1 for x.
call dothisotherwork (xfixed)
so before calling dothisotherwork I create a xfixed variable and assign it value of x.
y = y + 1
loop until y = 2
the real code should be
do
dothiswork(x)
dothisotherwork(xfixed)
y = y +1
loop until y =2
this xfixed variable nonsense is annoying me and making my code look horrible as my real code is nested do loops and significantly more sophisticated.
I know I'm missing something. I have followed my X very closely it is not a public variable. Can this be fixed with private declaration at module level or something?
any help would be greatly appreciated.
thank you
Chris
Bookmarks