--- title: Constant slug: Glossary/Constant tags: - CodingScripting - Constant - Glossary translation_of: Glossary/Constant original_slug: Glossary/Constant(定数) --- <p>定数とはプログラマーが変更できない値のことです。例えば、数値 (1, 2, 42) です。一方、{{glossary("variable","変数")}}の場合、プログラマーは既に使用されている変数名に新しい{{glossary("value","値")}}を割り当てられます。</p> <p>変数と同様に、定数を識別子に割り当てられることがあります。例えば、<code>pi</code> という識別子に 3.14... (円周率) を割り当てることがあります。</p> <h2 id="Learn_more" name="Learn_more">詳細情報</h2> <h3 id="General_knowledge" name="General_knowledge">基礎知識</h3> <ul> <li>Wikipedia 上の記事「{{Interwiki("wikipedia", "定数_(プログラミング)", "定数 (プログラミング)")}}」</li> </ul>