Well, Sup Forums ???

>x += 1;
>x++;

Other urls found in this thread:

docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.7.1).
twitter.com/NSFWRedditImage

x=x+1;

x++

y=1;
x=x+y;

>he doesn't use ++x;

++x;

x += ++x;

neither
>mutable state

>using increment an assignment operators
>having side-effects
>ever
x = 1
y = x + 1

x=0;
x*=x/x;

int y=1;
for (int i = 0;i < y;i=i+y)
{
int x=i+y;
}

x+x-xxx*x/x

x = [1].reduce((acc, cur) => x + acc + cur, 0)

1

x = new Integer(new Integer(x+1));

>x = new Integer(new Integer(x+1));

If the increment is 1, then I use ++x and x++ based on what the program needs to do.

x.inc

Depends on the compiler.

x++ definitely compiles down to a single increment op code. X +=1 or X = X + 1 probably does the same, but not necessarily.

inc eax

Add 1 to #x

i like to be expilcit and make sure some returns an error handle
new Function Increment{
if(x = int)
x = x +inc;
if(x = alpha+inc)
x=nex letter
if x = var,
x = x + inc
and so on

else x = undtermined;


return x

}

you're speakin my language, little lady

addi $t0, $t0, 1

this

(define new-x (+ x 1))

>Car car = new Car;

n = 1
ii = ii + n

Yes

The result is x+2.
Next querstion?

int y = 1
while y

dumb compilerposter

PLEASE DELETE

(define full-addero
(lambda (b x y r c)
(conde
((== 0 b) (== 0 x) (== 0 y) (== 0 r) (== 0 c))
((== 1 b) (== 0 x) (== 0 y) (== 1 r) (== 0 c))
((== 0 b) (== 1 x) (== 0 y) (== 1 r) (== 0 c))
((== 1 b) (== 1 x) (== 0 y) (== 0 r) (== 0 c))
((== 0 b) (== 0 x) (== 1 y) (== 1 r) (== 0 c))
((== 1 b) (== 0 x) (== 1 y) (== 0 r) (== 1 c))
((== 0 b) (== 1 x) (== 1 y) (== 0 r) (== 1 c))
((== 1 b) (== 1 x) (== 1 y) (== 1 r) (== 1 c))
(succeed fail))))

(run 1 (s)
(fresh (r c)
(full-addero 0 1 1 r c)
(== (r c) s)))


This is all i need

my language of choice doesn't support x++

my language of choice doesn't support addition

my language of choice doesn't use transistors

HTML?

>incl x
>addl 1, x
Well?

>incl

FFS. Don't post it again. BRB, translating the article from one of the Russian sites.

C и C++
In those languages, there could be 13, 14 and God-knows-what. Different C++ compilers may give either 13 or 14. This is the typical example of an undefined behavior.
Moreover, even one compiler may produce different outputs, depending on its options. Some will warn you about it, for example gcc -Wall will write 'warning: operation on ‘i’ may be undefined.'
You can yield different results even in a single program:
int i=5,j=5;
i=++i+ ++i;
printf("i=%i j=%i" ,i,++j+ ++j); //Output: i=14 j=13

Another worthy example with C++ is:
int i = 0; int z = ++i + ++i + ++i + ++i;

Java
Java will output 13 (first pre-increment increases i by 1 and returns 6, the secont pre-increment increases i by 1 and returns 7), because the order of actions is strictly defined (docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.7.1).

C#
Returns 13 (it's a Java clone, after all).
ObjectiveC
Clang warns about "Multiple unsequenced modifications to 'i'" but then returns 13.
awk
Awk outputs 13:
awk 'BEGIN { i=5;j=5;i=++i+ ++i; print i, ++j+ ++j}'
13 13

ActionScript 3.0
var test:int = 5;
trace(++test + ++test);//13
test = 5;
trace(test++ + test++);//11

ActionScript 2.0
i=5; trace(++i + ++i); //13
i=5; trace(i++ + i++); //11

Perl
Perl outputs 14:
my $i = 5;
$i = ++$i + ++$i;
print $i;

Pawn
main()
{
new i = 5, j = 5;
i = ++i + ++i;

printf "%d %d", i, ++j + ++j;
}

Output is 13 13
PHP
$i = 5;
$i = ++$i + ++$i;
echo $i;

Outputs 13.
JavaScript
JS V8 outputs 13:
i = 5
i = ++i + ++i
document.write(i)

Bash:
GNU/Bash outputs 13.
~$ i=5; echo $((++i + ++i))
13

Fortran 90
13, as expected.
program mindfuck
integer i
i = 5
i = INC (i) + INC (i)
print *,i
contains
integer function INC (i)
integer,intent(inout)::i
i=i+1
INC = i
end function INC
end program mindfuck

Common Lisp
v2.49 returns 13.
[1]> (defvar i 5)
I
[2]> (+ (incf i) (incf i))
13

++x++;

x = (x+(2*1))-1

try
{
int x;
int y = x;
int z = 0;
int z = x + y;
x = z;
return x;
}

Python
Returns 10 because it can't increment with ++:
i = 5
i = ++i + ++i
print i

VB: 10
i = 5
i = ++i + ++i
log.WriteLine("i = " & i)

Powershell
PS returns 13.
$i=5
$i=++$i + ++$i
Write-Host $i

Rexx
Rexx returns 10.
i=5
i=++i + ++i
SAY i

Delphi
++ is a procedure and therefore throws a error:
[Error] Incompatible types: 'Integer' and 'procedure, untyped pointer or untyped parameter'

Pascal
There's no ++ operator.

IF ( x == 1) { x = 2; }
ELSE IF ( x == 2) { x = 3; }
ELSE IF ( x == 3) { x = 4; }
ELSE IF ( x == 4) { x = 5; }
ELSE IF ( x == 5) { x = 6; }
ELSE IF ( x == 6) { x = 7; }
ELSE IF ( x == 7) { x = 8; }
ELSE IF ( x == 8) { x = 9; }
ELSE IF ( x == 9) { x = 10; }
ELSE { print("your number is too high!"); };

#define plus +
constexpr DWORD one() { return 1; }

x = x plus one();

x = (new Number(x).constructor.prototype + Math.pow(Math.sqrt(x), 2) + '').split('.')[0]

well, its good in converting numbers to strings.. you tried

- 1 + 1

x += n is more flexible

>there are languages being used RIGHT NOW that don't have ++ post-increment

This nigga knows what's up

...

plus or equal too operator seems legit

this certainly doesn't explain shit.
in an actual compiler, if it is optimized, both codes would result in the same series of instructions.

Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> i = 0
> i++
stdin:1: syntax error near '+'
> i += 1
stdin:1: syntax error near '+'
> i = i + 1
>

if incrementing by one
>x++
if incrementing by two or larger
>x+=number

x = x++ + 1;

x += 1:
x++;
++x;
x=x+1;
y = 1; x+=y;
y=2; x-=1-y;
for(i=0; i

>doubling memory for the autismo factor of "side effects"

Sometimes incrementing is okay, no need to sperg out.

>plus or equal too operator seems legit
what did he mean by this?

y=2
y=2
...

Imagine C is a cat. C++ is a cat with a twinkle tush.

not a programming language

Gee Bill!

x*=x+x/x

>not using "your number is false"

x = y
y = x + 1
...

++x you dinguses

x += x == x || x != x;