In some programming languages, I see (ex.):
x := y
What is this := operator generally called and what does it do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In all languages that support an operator
:=it means assignment.:=, the=operator usually means an equality comparison.=means assignment,==is typically used for equality comparison.I can’t recall any languages where
:=means the same as=.In MySQL
:=and=are both used for assignment, however they are not interchangeable and selecting the correct one depends on the context. To make matters more confusing the=operator is also used for comparison. The interpretation of=as either assignment or comparison also depends on context.