Prefix/Postfix
#4

Код:
new a = 0;          // a = 0
printf("%d", a++);  // prints a = "0", increase a +1
new b = 0;          // b = 0
printf("%d", ++b); // increase b + 1, prints b = "1"
I think nothing different to compare by efficiency, but that will be useful in function to write a fewer line for example, i increased variable and convert it to string.
Код:
++variable;
valstr(string, variable);
To:
Код:
valstr(string, ++variable);
Or vice versa:
Код:
valstr(string, variable);
variable++;
To:
Код:
valstr(string, variable++);
Sorry for my bad english.
Reply


Messages In This Thread
Prefix/Postfix - by DTV - 10.11.2016, 01:00
Re: Prefix/Postfix - by Micko123 - 10.11.2016, 08:02
Re: Prefix/Postfix - by PrO.GameR - 10.11.2016, 09:41
Re: Prefix/Postfix - by RoboN1X - 10.11.2016, 11:04
Re: Prefix/Postfix - by SyS - 10.11.2016, 11:38

Forum Jump:


Users browsing this thread: 1 Guest(s)