Difference between revisions of "Constant"

From Free Pascal wiki
Jump to navigationJump to search
m (bypass redirect)
 
Line 21: Line 21:
 
== See also ==
 
== See also ==
 
* [[Const|<syntaxhighlight lang="pascal" inline>const</syntaxhighlight>]]
 
* [[Const|<syntaxhighlight lang="pascal" inline>const</syntaxhighlight>]]
* [[Constants]]
+
* [[Basic Pascal Tutorial/Chapter 1/Constants|Constants]]
 
* [[Class constants]]
 
* [[Class constants]]

Latest revision as of 21:53, 23 February 2023

English (en) suomi (fi) français (fr) русский (ru) 中文(中国大陆)‎ (zh_CN)

A constant is a variable that does not change, it has a final value.

Constants are defined in the const section of a Free Pascal program. When a symbol is defined as constant, the Free Pascal compiler can often do some optimizations to make the output code faster or smaller.


Some special Free Pascal constants are:

Logical truth values

data type limits


The mathematical value π is realized as a function in system.pi.

See also