- Messages
- 2 267
- Réactions
- 757
- Points
- 556
Frédéric, je dois être un peu fatigué après mon footing, mais je ne comprends pas pourquoi ton copain s'étonne qu'une variable/table qu'il demande comme "local", reste local?...
Ou alors, j'ai loupé quelque chose???...
S'il veut qu'elle soit globale, il lui suffit de la définir comme telle en tête de son script. Celle-ci restera vivante durant toute la durée du Thread.
Sinon, elle va restée vivante uniquement durant la durée de vie de la "function". C'est la définition même de la "Portée" d"une variable...
C'est quelque chose qui est constant quelque soit les langages.
J'ai juste lu ce dernier Thread, j'ai peut être loupé un élément de compréhension???...
Ou alors, j'ai loupé quelque chose???...
S'il veut qu'elle soit globale, il lui suffit de la définir comme telle en tête de son script. Celle-ci restera vivante durant toute la durée du Thread.
Sinon, elle va restée vivante uniquement durant la durée de vie de la "function". C'est la définition même de la "Portée" d"une variable...
C'est quelque chose qui est constant quelque soit les langages.
J'ai juste lu ce dernier Thread, j'ai peut être loupé un élément de compréhension???...
Dernière édition: