05.03.2014, 17:44
pawn Код:
main()
{
for (;;)
{
new value;
printf("old value: %d", value); // always 0
value = random(10000);
printf("new value: %d", value);
sleep(1000);
}
}
pawn Код:
main()
{
for (;;)
{
static value;
printf("old value: %d", value); // not lost unlike with "new"
value = random(10000);
printf("new value: %d", value);
sleep(1000);
}
}