calling a module in a procedure

T

thomasc

Guest
My understanding is that I can't call a module inside a procedural block.

I think the called module cannot be specified function or task because the
module serves as input to the system and its values change constantly.

I was wondering what I should do if I need to call the module inside a
procedural block because data should be modified as a part of the
procedure and the modification can only be specified in another module?
Is there a typical way to get around this?

any comment will be appreciated.
Thanks!

Thomas
 
"I was wondering what I should do if I need to call the module inside a
procedural block because data should be modified as a part of the
procedure".....
then why dont you implement the module as a task. it can then be called
from a procedural block.
 
thomasc wrote:
My understanding is that I can't call a module inside a procedural
block.

I think the called module cannot be specified function or task
because the module serves as input to the system and its values
change constantly.

I was wondering what I should do if I need to call the module inside a
procedural block because data should be modified as a part of the
procedure and the modification can only be specified in another
module? Is there a typical way to get around this?
No. A module must be instantiated, not called. Think of it as a box of
electronics - it is not something that is done, but something that exists.

Similarly, global variables are a software concept, and not a hardware
concept - any signal which you wish to use within a module must be an input
to that module.

Parameters and defines can be made to behave like a global constant if that
is what you are after.

John

--
John Penton, posting as an individual unless specifically indicated
otherwise.
 
Exactly as said by Neo.....

Module is instantiated. And if want to call/perform some function again
and again, use task or function.
 

Welcome to EDABoard.com

Sponsor

Back
Top