What does "assign A to B" mean?

437 Views Asked by At

If I say "assign A to B", does it mean (a) A ← B or (b) B ← A?

In other words, is it (a) A or (b) B that is being modified?

(a) makes sense because A has responsibility over B, so A is assigned to B.

(b) makes sense because A is some object in memory that needs an owner, so object A is assigned to an owner B.

1

There are 1 best solutions below

0
k314159 On BEST ANSWER

As can be seen in this Wikipedia page, conventionally the assignment a := b can be described in English by both the following statements, which are equivalent/interchangeable:

  1. the value b is assigned to a (or assign b to a)
  2. a is assigned the value b (or assign a the value b)

As you can see, it all depends on whether the word 'assigned' is followed by 'to'.