What does := mean in pseudocode?
pseudocode, syntax
Solution
What does the `:=` stand for?
It's an assignment operator, derived from the Pascal programming language.
Is it `+=` or a normal `=`?
`:=` is equivalent to `=`, not to be confused with the compound assignment operator (e.g. `+=`).
See Variants in assignments and expressions at freepascal.org for a quick reference.
Problem
I am currently looking at pseudocode of a quicksort algorithm. On some lines it says something like: ``` i := left ``` What does the `:=` stand for? Is it `+=` or a normal `=` ? FYI: This is the complete pseudocode (German): ``` funktion teile(links, rechts) i := links // Starte mit j links vom Pivotelement j := rechts - 1 pivot := daten[rechts] wiederhole // Suche von links ein Element, welches größer als das Pivotelement ist wiederhole solange daten[i] ≤ pivot und i < rechts i := i + 1 ende // Suche von rechts ein Element, welches kleiner als das Pivotelement ist wiederhole solange daten[j] ≥ pivot und j > links j := j - 1 ende falls i < j dann tausche daten[i] mit daten[j] ende solange i < j // solange i an j nicht vorbeigelaufen ist // Tausche Pivotelement (daten[rechts]) mit neuer endgültiger Position (daten[i]) falls daten[i] > pivot dann tausche daten[i] mit daten[rechts] ende // gib die Position des Pivotelements zurück antworte i ende ```