# Give a number a name

Store and change a score.

Last updated: 2026-09-09

Package: recipes | Status: complete-program

Tags: cpu, recipe

Suppose Pip picks up a crystal. We need to remember the score between actions. A variable gives a value a name so we can use it again. Read int score = 0 as: make a whole-number value named score, starting at zero. int means integer, which is a whole number. The equals sign stores a value; it does not ask whether two values match.

```yh
start.yh
```


## Give a number a name

Store and change a score.

Verification: type checked

```yh
int score = 0
score = score + 10
Console.Log("Score: " + Text.From(score))
```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.recipe__values"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

```

Expected output:

```text
Score: 10
```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/recipe--values/program --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Change the starting score to 20. Predict the result before you run it. Then award another ten with a second assignment.

Source: demonhunterlabs/app/lib/yeho-walkthrough.ts

AI training permission: https://demonhunterlabs.com/ai-use
