Procedure problem
Posted: Mon May 05, 2003 3:59 pm
Dear all,
I'm stupid and I need your help.
Can anyone say me why in the following piece of code, the structure-member values are lost in the body of the Procedure test1?
Many thanks To all
Sergio
; ************************************************
Structure f3
a.f
b.f
c.f
EndStructure
Procedure test1(*x.f3,*y.f3)
Debug "Procedure Test1: input values:"
Debug "a: " + StrF(*x\a)
Debug "b: " + StrF(*x\b)
Debug "c: " + StrF(*x\c)
Debug "---------------------"
*y\a = *x\c
*y\b = *x\b
*y\c = *x\a
EndProcedure
Procedure test(*x.f3,*z.f3)
Debug "Procedure Test: input values:"
Debug "a: " + StrF(*x\a)
Debug "b: " + StrF(*x\b)
Debug "c: " + StrF(*x\c)
Debug "--------------------"
test1(@x.f3,@z.f3)
EndProcedure
DefType.f3 k, j
k\a = 1.1
k\b = 2.2
k\c = 3.3
Debug "Structure values before procedure call: "
Debug "a: " + StrF(k\a)
Debug "b: " + StrF(k\b)
Debug "c: " + StrF(k\c)
Debug "--------------"
test(@k.f3,@j.f3)
End
;****************************************
[/code]
I'm stupid and I need your help.
Can anyone say me why in the following piece of code, the structure-member values are lost in the body of the Procedure test1?
Many thanks To all
Sergio
; ************************************************
Structure f3
a.f
b.f
c.f
EndStructure
Procedure test1(*x.f3,*y.f3)
Debug "Procedure Test1: input values:"
Debug "a: " + StrF(*x\a)
Debug "b: " + StrF(*x\b)
Debug "c: " + StrF(*x\c)
Debug "---------------------"
*y\a = *x\c
*y\b = *x\b
*y\c = *x\a
EndProcedure
Procedure test(*x.f3,*z.f3)
Debug "Procedure Test: input values:"
Debug "a: " + StrF(*x\a)
Debug "b: " + StrF(*x\b)
Debug "c: " + StrF(*x\c)
Debug "--------------------"
test1(@x.f3,@z.f3)
EndProcedure
DefType.f3 k, j
k\a = 1.1
k\b = 2.2
k\c = 3.3
Debug "Structure values before procedure call: "
Debug "a: " + StrF(k\a)
Debug "b: " + StrF(k\b)
Debug "c: " + StrF(k\c)
Debug "--------------"
test(@k.f3,@j.f3)
End
;****************************************
[/code]