Z
ZombieTom
Guest
Hi guys,
This is not a problem, just something I found confusing that cleverer peeps may know more about.
In an object, I create an array - just a local array, not a global one. I then call a script within that same object, not passing any parameters to it. I have found that within the script, I can still access and modify the array as normal. Is this right? I thought scripts were like functions an therefore any variables created outside the script would be 'out of scope' unless passed to the script. Are scripts like php include files where the code they contain is just copied into the main program at run time? If this is the case, what is the need for the parameters; argument0, argument1, argument2 and so on?
I hope that makes sense.
This is not a problem, just something I found confusing that cleverer peeps may know more about.
In an object, I create an array - just a local array, not a global one. I then call a script within that same object, not passing any parameters to it. I have found that within the script, I can still access and modify the array as normal. Is this right? I thought scripts were like functions an therefore any variables created outside the script would be 'out of scope' unless passed to the script. Are scripts like php include files where the code they contain is just copied into the main program at run time? If this is the case, what is the need for the parameters; argument0, argument1, argument2 and so on?
I hope that makes sense.