{"id":"language--variables-assignment","name":"Variables and assignment","owner":"yeho","package":"language","kind":"language","signature":"Type name = expression\nname = expression","description":"Types come before names. Declare with an initial value, then use = to replace the value.","context":"Use a narrow explicit type when the value is part of the program's meaning or machine contract.","parameters":[],"returns":"","members":[],"tags":["=","cpu","language","values","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"docs/language/language-core.md §3.6; tests/compiler/kyber/scalar-runtime/start.yh"},"status":"stable","notes":["Implicit untyped declarations are not admitted.","Compound assignment such as += is unavailable. Spell the complete assignment."],"examples":[{"id":"complete-0","title":"Declare and update","description":"Use a narrow explicit type when the value is part of the program's meaning or machine contract.","code":"int score = 10\nscore = score + 5\n\ntext message = \"Score: \" + Text.From(score)\nConsole.Log(message)\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.language__variables_assignment\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"f3baa5a446cf5f1108c626d9546d079a208769db03921a57cde78f9fe74219fa","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=language--variables-assignment","json":"https://demonhunterlabs.com/reference/items/language--variables-assignment.json","markdown":"https://demonhunterlabs.com/reference/text/language--variables-assignment.md"}
