0

pronunciation of assignment

Hi everybody, this is a question to the English native-speakers of you. If you have a line of code like 'String name = "David"; and you want to read this aloud to someone else, say a colleague, how do you pronounce it? String name is being assigned to David? String name is getting David? Or something else? Thanks in advance andreas

5th Feb 2017, 11:27 AM
andreas
3 Respostas
+ 3
One trick from my Pascal times was to call the assignment operator (it was ":=") like "takes as value". In Java, I'd pronounce "=" as "takes as value", in order to differentiate it from the comparison operator "==", which I'd read as "is equal to".
5th Feb 2017, 11:50 AM
Álvaro
+ 1
String name is equal to David
5th Feb 2017, 11:33 AM
Blightedsage
Blightedsage - avatar
+ 1
Thank you, Alvaro. That's exactly the differentiation I use in German. By the way, Standard Pascal was also my first programming language, and this was only one and a half years ago. It was much more difficult than I had expected it to be ;)
5th Feb 2017, 1:45 PM
andreas