View previous topic :: View next topic
|
Author |
Message |
anjani shanker
New User
Joined: 26 Jan 2007 Posts: 37 Location: USA
|
|
|
|
Hi,
I am sorry for bugging you all every now and then but I cant help it as I am new to PLI ...Alright here is another problem I am stuck with...The scenario is like I want a module to call another module passing some variables thru pointer...this way it is going to happen.
Module M calls N with variable V1 and V2.
I have pointer defined for V1 and V2 say PTR which i am calling N with.
In module M(calling module) I am reading a file and passing V1 and V2 to N(called module) for every file record read. In module N depending on value of V1 i need to accumulate V2. So that means every time I call N...N should have the last value of V1 which i am storing in a local variable. I think everytime i call N..N should invoke from scratch...right? If yes how should I make it invoke with prior called stored values.
I hope I have made the scenario understanble to you. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi Anjani,
I'm not sure if you can use STATIC storage for that local variable. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
There's a link to the manuals at the top of the page. Read up on BYVALUE, BYADDR, and STATIC attribute for variables. If you have questions after reading and trying them, please let us know. |
|
Back to top |
|
|
donateeye Warnings : 2 New User
Joined: 01 Jun 2007 Posts: 62 Location: chennai
|
|
|
|
S, its right... try declaring the variables as STATIC in all the blocks wherever its used (normally it isnot required to declare in every block). This will hold the stored value for you. |
|
Back to top |
|
|
|