Перейти к содержанию

Этот урок ещё не переведён на русский язык, поэтому показан на английском.

Начало урока

An Address Is Also a Number

The memory lesson said it in passing: cells are numbered, and the number of a cell is its address. Today that innocent remark detonates. Addresses are numbers — and everything the course has established about numbers instantly applies to them: they can be stored in cells, and they can be computed. Half of the machinery of programming falls out of those two clauses.

Learning goals: explain what it means for a cell to hold the address of another cell; show that "being an address" is a reading, not a property; and demonstrate address arithmetic — reaching a cell nobody named in advance.

Start with the question

Cell 7 holds the number 100. Question: what is in cell 7?

After the agreement lesson you know to answer carefully: the number 100, and nothing else — meanings depend on the reader. But consider one particular reading agreement, modest-looking and world-carrying: "the number in cell 7 is the address of the cell I actually care about." Under this agreement, cell 7 does not hold a quantity — it holds a direction: "go to cell 100". A number read this way is universally called a pointer (or reference) — one word to learn, a lifetime of use.

cell 7 100 cell 100 45 "the thing I mean lives THERE" The arrow is not stored anywhere. Cell 7 holds 100; the arrow exists in the reading.

Say the crucial sentence aloud: the machine stores no arrows. Cell 7 holds the number 100 — a perfectly ordinary number that another reader could take for a temperature. The pointing is a reading agreement, exactly like "letter" or "brightness" — and like them it can be applied, withheld, or (with consequences a later tier will relish) misapplied.

Продолжите этот урок на YourAIZone

В полном уроке — объяснение целиком, разобранные примеры, частые ошибки, тесты с мгновенной проверкой и ИИ-репетитор. Начните сразу как гость или создайте аккаунт, чтобы сохранять прогресс.

В полном уроке

  • Объяснение целиком
  • Разобранные примеры
  • Частые ошибки и как их избежать
  • Тестовые вопросы: 2
  • ИИ-репетитор, который отвечает на вопросы по теме
  • Отслеживание прогресса для ученика, родителей и учителя