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, 2015 at 8:18
  • I would say for X equal to 5 Aug 7, 2015 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. Aug 8, 2015 at 10:09

2 Answers 2


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


if (x == 5)

Is pronounced - if x is equal to five


x = 5

Is pronounced - x equals five

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


Programming Answer:

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

tells the computer:

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


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"

Math Answer

In algebra and calculus "x = 5" would be "x equals 5"

  • So how do pronounce eventually? the same algebra way? Aug 7, 2015 at 8:36
  • 1
    I always say x=5 as "x equals five" @Milad even though it is technically incorrect.
    – SolarLunix
    Aug 7, 2015 at 8:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .