Thread Scope erzeugen (5 answers)
Opened by bianca at 2010-04-16 09:31

esskar
 2010-04-16 10:21
#136165 #136165
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
find da auch sowas ganz nett
Code (perl): (dl )
1
2
3
4
5
6
7
{
   my $static:
   sub count {
     $static || = 0;
     print $static++;
   }
}


so umgeht man die ganz fiesen GLOBALEN variablen und ersetzt sie durch so ne art statische variablen, wie man sie aus C kennt.

View full thread Scope erzeugen