cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 05 Jan 2014 03:45 PM |
| Is 'local' really necessary, ever? |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 03:47 PM |
YES You always want to make variables local unless you can't find any other way. If you don't use local variables and you have a 100+ line script then you are hogging up way too much memory than you should be. |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 03:47 PM |
| After the local variable's scope ends it is gone. |
|
|
| Report Abuse |
|
|
cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 05 Jan 2014 03:48 PM |
| Oh, so local variables are just valid inside a function? |
|
|
| Report Abuse |
|
|
cart6157
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 2194 |
|
|
| 05 Jan 2014 03:49 PM |
| Ok you posted faster than me |
|
|
| Report Abuse |
|
|