Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This is probably a very lame question, but what is the correct pronunciation of := in Delphi?

How would you say:

A := 5;

if A = 5 then
  B := TMyClass.Create;

I think I've heard "A equals 5", and "5 is assigned to A", and "A is set to 5" for values, but I'm not sure if either of these are any good. For the reference assignment I think "B refers to a new instance of TMyClass" is the correct way? Or should it be "points to" instead?

I believe that a well established way of describing programming statements is important for the community. It makes it easier to cooperate and interact.

Feel free to add other programming structures to this question. We can make this a community wiki if the topic is of interest.

share|improve this question
8  
I always mentally verbalized it as "set equal": : (set), = (equal). But as far as I know I just made that up – Factor Mystic May 12 '11 at 15:09
show 8 more comments

migrated from stackoverflow.com Jun 4 '11 at 2:39

18 Answers

A := 5 A is assigned the value 5

A := B A is assigned the value of B

A := func A is assigned the return value of func

A := class.contructor A is assigned a new instance of class

A = B A is equal to B

I also often say "colon-equal" for := when talking verbatim about delphi code.

share|improve this answer
33  
+1 for colon-equal. :-) – stealthyninja May 12 '11 at 11:40
3  
+1 for often talking verbatim about delphi code! :) – Julian May 31 '11 at 17:10

I've heard it referred to as "gets". As in "A gets 5".

share|improve this answer
2  
+1 "gets" is how you pronounce it in S or R where it is written <- I like gets. – David Heffernan May 12 '11 at 11:09
1  
+1 This is how our college professors used it. SUNY Potsdam, class of '88.... First two years were Pascal. – Chris Thornton May 12 '11 at 12:39
show 2 more comments

"A becomes 5" works for me.

Sometimes I think "A equals 5" but I know it's not a mathematical 'equals'.

==EDIT==

most of that second line was added to make the answer meet the length requirement. I don't really like the "equals" pronunciation.

share|improve this answer
1  
A equals 5 sounds for me like = not := – daemon_x May 12 '11 at 9:09
1  
"A equals 5" is not quite A = 5, that should be "A is equal to 5". – David Heffernan May 12 '11 at 9:16
2  
@David - I mean is sense of if A equals 5 then ... – daemon_x May 12 '11 at 9:28
2  
I'll add my vote here as in Dutch we say "wordt" which translates to "becomes". It's also the shortest version. I'm a C++ programmer myself where ":=" is "=" and I samply say "is". Even shorter :) – Mike Versteeg May 12 '11 at 11:01
show 4 more comments

I would say

A rabbit 5
or A bunny 5

From a visual point of view :=

share|improve this answer
4  
+1 for style. ;-) – Konrad Rudolph May 12 '11 at 13:24

The statement above is called the assignment statement in programming, so the most correct way, I believe, to describe the statement in the case of A:=5 is to say "Assign 5 to A".

share|improve this answer

I usually say:

"Let a be 5".

share|improve this answer
4  
+1 and let me guess: you started coding with basic – mbx May 14 '11 at 20:40
1  
German version: Sei a 5. – KingCrunch May 26 '11 at 21:44
1  
there := light .. wow, I feel important now! – Tim Post Jun 4 '11 at 2:50
show 2 more comments

I've no idea where I got this from, but in my head I say "A becomes equal to 5". This differentiates from the "A is equal to 5" used in conditional statements.

I wouldn't ever think "A equals 5" - it's just too ambiguous.

share|improve this answer
1  
+1, I read it as "becomes equal to" too. I think I learned this back in the Turbo Pascal days. – David M May 13 '11 at 0:34

:= means definition, as in let define A as number 5 (more details in the table). For contrast = means equality as in equation.

Pascal language by Wirth's design pays much respect to Mathematics, hence the usage of this symbol instead of = because:

a = a + b solves to b ≡ 0 which is incorrect either algorithmically or mathematically.

In your example line 4 defines B as Create() function value.

Here is an example of := being used to define hyperbolic cosinus function:

rendered from TeX formula at wikimedia

When it comes to verbalizing Pascal code, := the assignment "operator" (it is not real operator in Pascal) sounds like: assign <right-part-expression> to <left-part-identifier>

share|improve this answer
2  
Hello and welcome to the StuckOverflaw, anonymous downvoter! – user422039 May 12 '11 at 14:09
show 2 more comments

When I was taught Pascal, way back when, I heard x := 42 pronounced as

x becomes equal to 42

It has stuck with me ever since.

Similarly, x = 42 as

x is equal to 42

share|improve this answer
show 2 more comments

Interesting question. I don't think an assignment statement is something I ever try to say out loud. If I had to I would say A becomes 5.

share|improve this answer
  1. Assign to
  2. Set to
  3. Colon equals
share|improve this answer

A := 5 would be "A is assigned 5"

A = 5 would be "A equals 5"

share|improve this answer
1  
This had already been answered stackoverflow.com/questions/5975621/correct-pronunciation-of/… – Trufa May 12 '11 at 15:02
show 4 more comments

For A := B I say: "A becomes equal to B"

share|improve this answer

I usually say both := and = as "A equals 5". And let the context it is in inform the listener of which meaning is used.

Other times I will pronounce := as "Set A to 5" or "Set A equal to 5"

share|improve this answer

Victor Borge worked out an excellent system for phonetic punctuation.

In his system, it would sound like this:

pwt, pwt, pfwssh, pfwssh

or this:

pwt, pfwssh, pwt, pwfssh

Note -- the p is silent in pwfssh...

share|improve this answer
show 1 more comment

I have always pronounced it "co-equals".

As in: "A co-equals B"

share|improve this answer

Repeating really, but I have said (and thought) A := 5 as A is assigned to 5 for the last 27 years, as that is what my lecturer and tutor said in my first year Pascal class. or was is in the language reference?

I have also heard A becomes 5

A = 5 is simply A equals 5, normally combines with an if or while.

share|improve this answer

In Dutch it easy A wordt 5 for which the best English translation would be A becomes 5

share|improve this answer
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.