Passing pointers between objects in SPIN
Eli
Posts: 3
Hello all,
I am having a problem passing pointers from one object to another in SPIN. When I print from the pointer location inside the home object, the correct information is printed, but when I pass the pointer value to another object and try to print from there, I get something completely different. Both pointer values are identical, so my guess is that the information that the pointer is pointing to is overwritten then the·object call is made. Any·ideas?
--Eli
I am having a problem passing pointers from one object to another in SPIN. When I print from the pointer location inside the home object, the correct information is printed, but when I pass the pointer value to another object and try to print from there, I get something completely different. Both pointer values are identical, so my guess is that the information that the pointer is pointing to is overwritten then the·object call is made. Any·ideas?
--Eli
Comments
Much can depend on what you mean by "printing" and how it is done...
Can you post your code?
Post Edited (deSilva) : 1/5/2008 2:47:15 AM GMT
are you referring to passing values to an object?
if so:
main file
someobject.task(variable) 'calls the object and passes the variable
OBJECT FILE
pub task(variable)
add code here
you'll of coarse have to add the variable call outs and such to each file. hope that make sense.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Post Edited (Dgswaner) : 1/5/2008 1:16:30 AM GMT