Home   Help Search Login Register  

Author Topic: define _x as private?  (Read 829 times)

0 Members and 2 Guests are viewing this topic.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
define _x as private?
« on: 25 Jul 2003, 20:12:49 »
if im writing a function where i use _x in a foreach command, do  i still need to define it as a private variable? (or is it automatically defined)

deaddog

  • Guest
Re:define _x as private?
« Reply #1 on: 25 Jul 2003, 20:32:48 »
The _x in a foreach command has "local" scope.  You can have a _x variable in the other part of your script but it will not be affected by the _x inside the foreach command.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:define _x as private?
« Reply #2 on: 25 Jul 2003, 20:35:13 »
so that means i don't have to define it?

deaddog

  • Guest
Re:define _x as private?
« Reply #3 on: 25 Jul 2003, 21:04:32 »
that's correct  :)

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:define _x as private?
« Reply #4 on: 25 Jul 2003, 21:08:17 »
thx for the help!
« Last Edit: 26 Jul 2003, 00:39:07 by pablo_m123 »