Difference between revisions of "Constant"
From Lazarus wiki
Jump to navigationJump to search (edit) |
|||
Line 1: | Line 1: | ||
{{Constant}} | {{Constant}} | ||
− | A '''constant''' is | + | A '''constant''' is a variable that does not change, it has a fixed value. |
− | Constants are defined in the [[Const|const]] section of | + | Constants are defined in the [[Const#Const_Section|const]] section of a Free Pascal program. When a variable is constant the [[Compiler|Free Pascal compiler]] can often do some optimizations to make the output code faster or smaller. |
− | Some special | + | Some special Free Pascal constants: |
Logical truth values | Logical truth values | ||
Line 14: | Line 14: | ||
* [[Nil]] | * [[Nil]] | ||
− | Mathematical | + | Mathematical values |
* [[Pi]] | * [[Pi]] | ||
Revision as of 00:20, 19 September 2017
│
English (en) │
suomi (fi) │
français (fr) │
русский (ru) │
中文(中国大陆) (zh_CN) │
A constant is a variable that does not change, it has a fixed value.
Constants are defined in the const section of a Free Pascal program. When a variable is constant the Free Pascal compiler can often do some optimizations to make the output code faster or smaller.
Some special Free Pascal constants:
Logical truth values
Empty pointer value
Mathematical values