Difference between revisions of "Language Reference/Built-in entities/Constants"
From wiki.visual-prolog.com
(interface::null) |
(Review) |
||
Line 2: | Line 2: | ||
|- | |- | ||
|[[#compilation_date|compilation_date]] | |[[#compilation_date|compilation_date]] | ||
|Compilation date | |Compilation date | ||
|- | |- | ||
|[[#compilation_time|compilation_time]] | |[[#compilation_time|compilation_time]] | ||
|Compilation time | |Compilation time | ||
|- | |- | ||
|[[#compiler_buildDate|compiler_buildDate]] | |[[#compiler_buildDate|compiler_buildDate]] | ||
|Build date of | |Build date of the compiler | ||
|- | |- | ||
|[[#compiler_version|compiler_version]] | |[[#compiler_version|compiler_version]] | ||
| | |Compiler version number | ||
|- | |- | ||
|[[#maxFloatDigits|maxFloatDigits]] | |[[#maxFloatDigits|maxFloatDigits]] | ||
| | |Maximum supported <vp>digits</vp> for <vp>real</vp> domains | ||
|- | |- | ||
|[[#null|null]] | |[[#null|null]] | ||
|The default NULL pointer | |The default NULL pointer | ||
|- | |- | ||
|[[#nullHandle|nullHandle]] | |[[#nullHandle|nullHandle]] | ||
|A | |A constant of type handle with value 0 | ||
|- | |- | ||
|[[#invalidHandle|invalidHandle]] | |[[#invalidHandle|invalidHandle]] | ||
|A | |A constant of type handle with value −1 (invalid) | ||
|- | |- | ||
|[[#platform_bits|platform_bits]] | |[[#platform_bits|platform_bits]] | ||
| | |Bitness of the compilation platform (32 or 64) | ||
|- | |- | ||
|[[#platform_name|platform_name]] | |[[#platform_name|platform_name]] | ||
| | |Target platform name | ||
|} | |} | ||
==== compilation_date ==== | ==== compilation_date ==== | ||
Compilation date | Compilation date in the format ''YYYY-MM-DD''. | ||
<vip>compilation_date : string = "YYYY-MM-DD".</vip> | <vip>compilation_date : string = "YYYY-MM-DD".</vip> | ||
Line 40: | Line 40: | ||
==== compilation_time ==== | ==== compilation_time ==== | ||
Compilation time | Compilation time in the format ''HH:MM:SS'' (24-hour clock). | ||
<vip>compilation_time : string = "HH:MM:SS".</vip> | <vip>compilation_time : string = "HH:MM:SS".</vip> | ||
Line 46: | Line 46: | ||
==== compiler_buildDate ==== | ==== compiler_buildDate ==== | ||
Build date of the compiler. | Build date of the compiler in the format ''YYYY-MM-DD HH:MM''. | ||
<vip>compiler_buildDate : string = "YYYY-MM-DD HH:MM".</vip> | <vip>compiler_buildDate : string = "YYYY-MM-DD HH:MM".</vip> | ||
Line 52: | Line 52: | ||
==== compiler_version ==== | ==== compiler_version ==== | ||
Compiler version number (value depends on the compiler). | |||
<vip>compiler_version = | <vip>compiler_version = 1100.</vip> | ||
==== maxFloatDigits ==== | ==== maxFloatDigits ==== | ||
Maximum supported value of <vp>digits</vp> for <vp>real</vp> domains. | |||
<vip>maxFloatDigits = 16.</vip> | <vip>maxFloatDigits = 16.</vip> | ||
Line 68: | Line 68: | ||
<vip>null : pointer = uncheckedConvert(pointer, 0).</vip> | <vip>null : pointer = uncheckedConvert(pointer, 0).</vip> | ||
<vp>null</vp> is also implicitly defined on all interfaces | <vp>null</vp> is also implicitly defined on all interfaces as a null pointer of the interface type. If it were defined '''explicitly''', it would look like this: | ||
<vip> | <vip> | ||
Line 74: | Line 74: | ||
... | ... | ||
constants | constants | ||
null : xxx = uncheckedConvert(xxx, null). % | null : xxx = uncheckedConvert(xxx, null). % already implicitly defined | ||
... | ... | ||
end interface xxx | end interface xxx | ||
Line 99: | Line 99: | ||
==== invalidHandle ==== | ==== invalidHandle ==== | ||
A constant of type <vp>handle</vp> with the | A constant of type <vp>handle</vp> with the value <vp>-1</vp> (invalid for a handle). | ||
<vip>invalidHandle : handle = uncheckedConvert(handle, -1).</vip> | <vip>invalidHandle : handle = uncheckedConvert(handle, -1).</vip> | ||
Line 105: | Line 105: | ||
==== platform_bits ==== | ==== platform_bits ==== | ||
Bitness of the compilation platform. | |||
<vip>platform_bits = 32. | <vip>platform_bits = 32. | ||
Line 113: | Line 113: | ||
==== platform_name ==== | ==== platform_name ==== | ||
Target platform name. | |||
<vip>platform_name : string = "Windows 32bits". | <vip>platform_name : string = "Windows 32bits". |
Latest revision as of 15:34, 20 August 2025
compilation_date | Compilation date |
compilation_time | Compilation time |
compiler_buildDate | Build date of the compiler |
compiler_version | Compiler version number |
maxFloatDigits | Maximum supported digits for real domains |
null | The default NULL pointer |
nullHandle | A constant of type handle with value 0 |
invalidHandle | A constant of type handle with value −1 (invalid) |
platform_bits | Bitness of the compilation platform (32 or 64) |
platform_name | Target platform name |
compilation_date
Compilation date in the format YYYY-MM-DD.
compilation_date : string = "YYYY-MM-DD".
compilation_time
Compilation time in the format HH:MM:SS (24-hour clock).
compilation_time : string = "HH:MM:SS".
compiler_buildDate
Build date of the compiler in the format YYYY-MM-DD HH:MM.
compiler_buildDate : string = "YYYY-MM-DD HH:MM".
compiler_version
Compiler version number (value depends on the compiler).
compiler_version = 1100.
maxFloatDigits
Maximum supported value of digits for real domains.
maxFloatDigits = 16.
null
A constant of type pointer with the value 0.
null : pointer = uncheckedConvert(pointer, 0).
null is also implicitly defined on all interfaces as a null pointer of the interface type. If it were defined explicitly, it would look like this:
interface xxx ... constants null : xxx = uncheckedConvert(xxx, null). % already implicitly defined ... end interface xxx
Example This example shows how the constant can be used in a clause.
interface xxx end interface xxx ... clauses isNullXxx(X) :- xxx::null = X.
nullHandle
A constant of type handle with the value 0.
nullHandle : handle = uncheckedConvert(handle, 0).
invalidHandle
A constant of type handle with the value -1 (invalid for a handle).
invalidHandle : handle = uncheckedConvert(handle, -1).
platform_bits
Bitness of the compilation platform.
platform_bits = 32. or platform_bits = 64.
platform_name
Target platform name.
platform_name : string = "Windows 32bits". or platform_name : string = "Windows 64bits".