# how do pronounce assignment = in math or programming?

I know you pronounce equality `==` in `if(x == 5)` this way

If x equals to 5 . . .

But how do you utter it in a coding context (assignment); i.e. `=` in `x`=`5` ?

maybe something like:

x be assigned to 5

What would you say?

• I would say "5 is assigned to x", or "x is filled with 5"... but I'm not native english. In my native language (french), there is no way to say it "nicely". We would better talk of "x is initialized to 5". – Random Aug 7 '15 at 8:18
• I would say for X equal to 5 – Lucian Sava Aug 7 '15 at 8:28
• The first question (which nobody asked) should be: What programming language is this, that uses double "=" signs? Because yours is not a question about English; it is about that programming language. In BASIC , assigment is "LET A=B" (let A equal B) In C, you can say things such as "B++" (increment B). How you say it has nothing to do with English rules; it depends on the programming language's syntax. – Brian Hitchcock Aug 8 '15 at 10:09

There are very minor differences but they are basically the same:

## Comparison

``````if (x == 5)
``````

Is pronounced - `if x is equal to five`

## Assignment

``````x = 5
``````

Is pronounced - `x equals five`

Another, more technical way (the above is a colloquial term) is `set x to five`.

• "x = 5" in programming is not an equality... it puts the value "5" in the variable "x"... so I don't think we would say "x equals five". – Random Aug 7 '15 at 8:13
• @Random Yes I know, but you still say it in the same way – Beta Decay Aug 7 '15 at 8:13
• So you are pretty sure about `x equals five`, aren't u? – Milad Rahimi Aug 7 '15 at 8:17
• @Milad I often use it in conversation about mathematical equations or programs – Beta Decay Aug 7 '15 at 8:18
• – FumbleFingers Reinstate Monica Aug 7 '15 at 16:39

If (x == 5) { (code) }

tells the computer:

If (x is equal to 5) { Do this code }

While

x = 5

tells the computer

The variable x currently has the value of 5. (Anywhere the variable "x" is used the value of 5 will replace it unless x is changed later)

The reason we use "==" for "equals" is because we had already decided that " = " means "is assigned to"