2

I want to Google it but I don't even know what to call it.

It looks like some sort of assignment used in computer science or math.

Here it is again

:=

It is used to describe CS algorithms here:

http://www.cs.nyu.edu/~cconway/teaching/cs1007/notes/arrays.pdf

  • 5
    $A := B$ means (usually, it might have other meanings) that $A$ is defined as $B$. – Daniel Fischer Sep 15 '13 at 15:00
  • It is used when defining something. For instance, $f(x) := x^2$ – Prahlad Vaidyanathan Sep 15 '13 at 15:01
  • Look at the notes I just posted, and it would not make any sense in the context it is used. Also, does it have a name? For example + is the plus sign, = is the equal sign. – Bill - The Butcher - Cutting Sep 15 '13 at 15:02
  • I don't know if it has a name, but as I recall Pascal used it to mean "is assigned". Probably some other languages, too. I suspect this usage evolved from its use as "is defined as" in math, not the other way around. – joeA Sep 15 '13 at 15:05
  • CS and engineering have a tendency to take pure mathematical concepts and blur them to fit reality. – Bill - The Butcher - Cutting Sep 15 '13 at 15:07
  • In this case it seems, this blurred use of the symbol in Pascal, plopped back out on to paper form, where it no longer makes sense. I would consider this an error by the professor. He should have just used = – Bill - The Butcher - Cutting Sep 15 '13 at 15:09
  • Just saw your update with example. In this case it is used for assignment in pseudocode. "i := i + 1" means "load the location named i with its current value plus one" or, less verbosely, as "i is assigned i + 1". I think this is frequently used in pseudocode, perhaps because of the influence that Pascal once had. – joeA Sep 15 '13 at 15:10
  • Well it needs to stop. = makes more sense and is more clear. – Bill - The Butcher - Cutting Sep 15 '13 at 15:11
  • It's easy to figure out what it should mean, but if you are detail oriented like I am, you can't help but wonder why it is there. – Bill - The Butcher - Cutting Sep 15 '13 at 15:12
  • 1
    As far as I know (I read this in one of Dijkstra's EWDs), the pure math community stole this notation from Algol. – nigel Sep 15 '13 at 15:13
  • 1
    The use of ":=" instead of "=" is to distinguish between "is assigned" (a command to be performed) and "is equal to" (which results in a boolean value). Some other languages use "=" vs "==" to make this distinction, but it is probably a useful one. Usage of this notation would NOT be an error by the professor. – joeA Sep 15 '13 at 15:15
  • I would disagree, using = and == are standard ways to differentiate between assignment and equality. JavaScript, Java and other popular languages use this syntax. Also math uses = to represent assignment. The professor is using outdated ( or simply less used ) CS language ( not his fault the notes are from 2003 ) syntax when he should be using modern CS language syntax or pure math. – Bill - The Butcher - Cutting Sep 15 '13 at 15:19
  • 2
    You can use http://symbolhound.com/ instead of google to search for such symbols. – ott-- Sep 15 '13 at 15:20
  • 3
    The math software Maple uses := as well to assign its variable – Jean-Sébastien Sep 15 '13 at 15:20
  • the language the class is taught in, is Java. Typical absent minded professor making something simple more difficult than it needs to be.
  • – Bill - The Butcher - Cutting Sep 15 '13 at 15:21
  • http://www.cs.utexas.edu/users/EWD/ – Bill - The Butcher - Cutting Sep 15 '13 at 15:27
  • See also: https://stackoverflow.com/questions/5344694/what-does-do. – Gabriel Staples Mar 07 '21 at 23:58