Raised This Month: $ Target: $400
 0% 

Variable life time?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 02-17-2009 , 00:23   Re: Variable life time?
Reply With Quote #2

Typically, the scope of a variable is only as wide as the routine its defined in. Thus, the life of your variables is only valid as long as each routine is executing. As soon as the sub/function is exited, the variables are released. A variable defined globally (not within a sub/function, like args in the second example)), lives and is visible throughout the entire plugin.
In the example you cited, I'd assume the author was referring the the value of the variable being deleted rather than the variable itself.
In your code, you don't really need to sent a parameter. You could simplely obtain the plrid again by subtracting out the BASE_TASK_ID
__________________
=====================================
- My Plugins -
=====================================

Last edited by Vet; 02-17-2009 at 00:30.
Vet is offline
Send a message via MSN to Vet
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode