<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alexander+Doronin</id>
	<title>wiki.visual-prolog.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alexander+Doronin"/>
	<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Special:Contributions/Alexander_Doronin"/>
	<updated>2026-04-09T02:23:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3639</id>
		<title>Visual Prolog 7.4 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3639"/>
		<updated>2013-06-04T04:35:02Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7402 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== 64 bit programs ===&lt;br /&gt;
&lt;br /&gt;
The main new feature in Visual Prolog 7.4 is the ability to generate 64 bit programs (Commercial Edition only), making it possible to write programs that exploit more of the computers resources.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notice&amp;#039;&amp;#039;&amp;#039; to ensure source code compatability between 32 and 64 bit programs a number of types have been changed and it is necessary to update the programs, see [[Visual Prolog 7.4 Upgrade Notes]].&lt;br /&gt;
&lt;br /&gt;
See also [[64 bit Windows]]&lt;br /&gt;
&lt;br /&gt;
=== Program Point ===&lt;br /&gt;
&lt;br /&gt;
Support for exceptions handling improvement (programPoint type and attribute, implicit programPoint argument).  See also [[Language Reference/Predicates#programPoint|programPoint]].&lt;br /&gt;
&lt;br /&gt;
=== Syntax &amp;amp; Warnings ===&lt;br /&gt;
&lt;br /&gt;
* Better handling of comma (,) before then, elseif, else, end if, do and end foreach&lt;br /&gt;
* Error c550 for inlining a field from a null pointer&lt;br /&gt;
* Warning c647 if bound/1 is applied to a variable which is always free&lt;br /&gt;
* Warning if scope is only opened but is not actually used (unused open for class core is ignored). Removing such excessive open-directives makes the Optimal Includes more effective. This warning is switched off by the default (option /w:231 turns it on).&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC have been updated to be 64 bit compatible.  A few packages have not been updated, but have instead been deprecated and replaced by new packages.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;vpiEditor&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; editor)&lt;br /&gt;
* &amp;lt;vp&amp;gt;regExp&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== PFC/GUI ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; New editor control based on the [http://www.scintilla.org/ Scintilla] editor with lexers (including Visual Prolog lexer).&lt;br /&gt;
* &amp;lt;vp&amp;gt;webBrowser&amp;lt;/vp&amp;gt; New control control comprehensive wrapping of the Internet Explorer WebBrowserControl&lt;br /&gt;
* Improved clipboard handling (with HTML support)&lt;br /&gt;
* &amp;lt;vp&amp;gt;ribbonControl&amp;lt;/vp&amp;gt; and command system and controlSerialization; with a run-time visual designer that simplifies the process of making ribbons&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolboxControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;headerControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;rebar&amp;lt;/vp&amp;gt; + &amp;lt;vp&amp;gt;statusBar&amp;lt;/vp&amp;gt; New packages&lt;br /&gt;
* &amp;lt;vp&amp;gt;shellNotificationIcon&amp;lt;/vp&amp;gt; for handing notifications in the shells notification area + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolTip&amp;lt;/vp&amp;gt; New package and toolTip functionality on standard controls + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitControl&amp;lt;/vp&amp;gt; New control for multi-split management; with a run-time visual designer that simplifies the process of making splits&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitterControl&amp;lt;/vp&amp;gt; New control for the split in windows&lt;br /&gt;
* &amp;lt;vp&amp;gt;dragNdrop&amp;lt;/vp&amp;gt; New class for (in-program) drag and drop functionality + Demo&lt;br /&gt;
* Object oriented GDI support&lt;br /&gt;
* Object oriented GDI+ support for&lt;br /&gt;
** &amp;lt;vp&amp;gt;bitmap&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;brush&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;font&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;palette&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;pen&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;deviceContext&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;icon&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;gui_native::createDialogIndirectParam&amp;lt;/vp&amp;gt; Update for font handling&lt;br /&gt;
* &amp;lt;vp&amp;gt;window::listenUntilDestroy&amp;lt;/vp&amp;gt; New predicate for listening to an event, but detach the listening when the window is destroyed&lt;br /&gt;
* &amp;lt;vp&amp;gt;messageLoop&amp;lt;/vp&amp;gt; for SDI applications&lt;br /&gt;
&lt;br /&gt;
=== PFC (non-GUI) ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt; package based on [www.boost.org/libs/regex boost regular expression library]&lt;br /&gt;
* &amp;lt;vp&amp;gt;mapM_hash&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;setM_hash&amp;lt;/vp&amp;gt; New classes for hash table implementations of maps and sets&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM&amp;lt;/vp&amp;gt; uses pointer to memory instead of binary: makes it possible to interpret non-binaries as arrays and is more efficient&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_inline&amp;lt;/vp&amp;gt; New class for interpretation of C/C++ struct arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_boolean&amp;lt;/vp&amp;gt; New class for compact boolean arrays (1 bit per boolean).&lt;br /&gt;
* &amp;lt;vp&amp;gt;array2M&amp;lt;/vp&amp;gt; New class for 2 dimensional arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;socket&amp;lt;/vp&amp;gt; New class for object oriented WinSock2 support&lt;br /&gt;
* &amp;lt;vp&amp;gt;event0&amp;lt;/vp&amp;gt; - &amp;lt;vp&amp;gt;event7&amp;lt;/vp&amp;gt; New classes for general/generic event handling (notify+listener)&lt;br /&gt;
* &amp;lt;vp&amp;gt;iStream_stream&amp;lt;/vp&amp;gt; class for mapping a Visual Prolog stream as an IStream com object (CE-only)&lt;br /&gt;
* improved &amp;#039;&amp;#039;&amp;#039;ISAPI&amp;#039;&amp;#039;&amp;#039; support&lt;br /&gt;
* &amp;lt;vp&amp;gt;json&amp;lt;/vp&amp;gt; (pfc/web/json) and &amp;lt;vp&amp;gt;jsonRpc&amp;lt;/vp&amp;gt; New packages for JSON and JSON RPC 2.0 support (CE-only)&lt;br /&gt;
* memory allocate functions with argument for atomic/non-atomic&lt;br /&gt;
* ODBC auto parameter binding get the size from the database by means of SQLDescribeParam&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api::sHCreateStreamOnFileEx&amp;lt;/vp&amp;gt; new predicate for creating an IStream com object from a file&lt;br /&gt;
* &amp;lt;vp&amp;gt;xhtmlWriter&amp;lt;/vp&amp;gt; class for writing xhtml/xhtml5 using an &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;xmlReader&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt; based on the xmlLite API (CE-only) + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;internetExplorer&amp;lt;/vp&amp;gt; class for automating an out-of-process Internet Explorer&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
* New simplified settings dialog&lt;br /&gt;
* Add &amp;quot;No To All&amp;quot; button to the dialog for removing file from a project&lt;br /&gt;
* Create empty clause if there is compiler error for absent clause for a predicate&lt;br /&gt;
* Global unreachability support&lt;br /&gt;
* History of Run Arguments&lt;br /&gt;
* Improved Browse View&lt;br /&gt;
* Improved the manifest handling&lt;br /&gt;
* Load browse info in a separate thread (performance optimization)&lt;br /&gt;
* SDI applications support&lt;br /&gt;
* Tools entries in project-tree popup menu&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* Soft/hard breakpoints&lt;br /&gt;
* Add current class facts into the variable window&lt;br /&gt;
* Show class facts in the Variable Window for a class predicate&lt;br /&gt;
* Give names to objects&lt;br /&gt;
* Show &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; as dates and times.&lt;br /&gt;
* Show the error description for &amp;lt;vp&amp;gt;hResult&amp;lt;/vp&amp;gt; values.&lt;br /&gt;
* Watch Window improvement&lt;br /&gt;
* Copying the entire debug tree to the clipboard&lt;br /&gt;
* Improve memory view for 64bit and break points handling&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* win32.lib + win32.x64.lib updated to &amp;#039;&amp;#039;&amp;#039;Windows Software Development Kit (SDK) for Windows 8&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* PFC, VPI, IDE: Help button in the title bar&lt;br /&gt;
* SolutionManager. A utility for better handling of a collection of projects&lt;br /&gt;
* VipBuilder: Add /platform option for target machine&lt;br /&gt;
* VPI: Support DDE in SDI application&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7402 ===&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
*Compiler. Incorrect handling of some special floating-point constants leads to unexpected compile time errors (see [http://discuss.visual-prolog.com/viewtopic.php?t=9582 Real value 1.#INF is out of the range]).&lt;br /&gt;
*Compiler. Missing warning for unreachable codes (see [http://discuss.visual-prolog.com/viewtopic.php?t=9569 Unused Variable]).&lt;br /&gt;
*Compiler. [http://discuss.visual-prolog.com/viewtopic.php?t=9502 Ambiguity in wedBrowserControl].&lt;br /&gt;
*Compiler. Codes generation bug for string comparisson (it can lead to access violation exception at runtime in some cases).&lt;br /&gt;
*Compiler. Nested &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;-&amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;-&amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt; expressions can raise unexpected error messages related to the wrong flow patterns.&lt;br /&gt;
*Compiler. Unexpected error message for supported interface and inherited class conflict for a generic scope.&lt;br /&gt;
*Compiler. No error if constructor is absent for an object class with &amp;lt;vp&amp;gt;noDefaultConstructor&amp;lt;/vp&amp;gt; attribute.&lt;br /&gt;
*Compiler. Incorrect warning c231 (scope is opened but not used) in some cases.&lt;br /&gt;
*Compiler. Code generation bug for nested &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; statements with cuts in the &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt; part (this could could lead to exceptions at runtime in some cases).&lt;br /&gt;
*Compiler. Code generation bug for read-only property implemented by a clause with several heads.&lt;br /&gt;
*Compiler. Anonymous predicates in both &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as function and &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as predicate give declaration conflict.&lt;br /&gt;
*Compiler. Incorrect object file if number of fixups exceeds the limit of &amp;lt;vp&amp;gt;0xFFFF&amp;lt;/vp&amp;gt; (this could lead to the incorrect state of some statically initialized data, like class facts, etc.).&lt;br /&gt;
*Compiler. Several bugs in 64bit codes generation.&lt;br /&gt;
*Runtime: Bug in symbol comparison (see ).&lt;br /&gt;
*IDE: Browse search shows the same predicate many times.&lt;br /&gt;
*Debugger: Several bugs related to the Variables view.&lt;br /&gt;
*Debugger: Some problems in single step in if-then-else expression.&lt;br /&gt;
*PFC: [http://discuss.visual-prolog.com/viewtopic.php?t=9565 Bug in arrayM_boolean].&lt;br /&gt;
*PFC: Some keywords coloring (see [http://discuss.visual-prolog.com/viewtopic.php?t=9610 Cosmetic detail : &amp;lt;vp&amp;gt;guard&amp;lt;/vp&amp;gt;]).&lt;br /&gt;
*PFC: Some problems with handling of enter/leave mouse event.&lt;br /&gt;
*VPI: Incorrect behavior of predicate &amp;lt;vp&amp;gt;getText/1-&amp;gt;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
*Vip Linker: It does not accept utf-8 &amp;#039;&amp;#039;&amp;#039;.def&amp;#039;&amp;#039;&amp;#039; files (see [http://discuss.visual-prolog.com/viewtopic.php?t=9515 Dll - error in file MyDll.def]).&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
=== Build 7401 ===&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* if-the-else expressions&lt;br /&gt;
* Condition in if-statement/expression can be &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; calling convention&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
* ChainDB, 64bit: Problems when storing terms in a chain if &amp;quot;in_memory&amp;quot; is used&amp;lt;br&amp;gt;See [http://discuss.visual-prolog.com/viewtopic.php?t=9390 External Databases in V7.4 in 64bits]&lt;br /&gt;
* PFC: [http://discuss.visual-prolog.com/viewtopic.php?t=9377 Problem with console::setLocation in vip 7.4]&lt;br /&gt;
* VPI: Incorrect behavior of getText/1-&amp;gt;&lt;br /&gt;
* [http://discuss.visual-prolog.com/viewtopic.php?t=9421 Header prints in chinese!?!]&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Visual Prolog 7.4 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3638</id>
		<title>Visual Prolog 7.4 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3638"/>
		<updated>2013-06-04T04:23:45Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7402 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== 64 bit programs ===&lt;br /&gt;
&lt;br /&gt;
The main new feature in Visual Prolog 7.4 is the ability to generate 64 bit programs (Commercial Edition only), making it possible to write programs that exploit more of the computers resources.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notice&amp;#039;&amp;#039;&amp;#039; to ensure source code compatability between 32 and 64 bit programs a number of types have been changed and it is necessary to update the programs, see [[Visual Prolog 7.4 Upgrade Notes]].&lt;br /&gt;
&lt;br /&gt;
See also [[64 bit Windows]]&lt;br /&gt;
&lt;br /&gt;
=== Program Point ===&lt;br /&gt;
&lt;br /&gt;
Support for exceptions handling improvement (programPoint type and attribute, implicit programPoint argument).  See also [[Language Reference/Predicates#programPoint|programPoint]].&lt;br /&gt;
&lt;br /&gt;
=== Syntax &amp;amp; Warnings ===&lt;br /&gt;
&lt;br /&gt;
* Better handling of comma (,) before then, elseif, else, end if, do and end foreach&lt;br /&gt;
* Error c550 for inlining a field from a null pointer&lt;br /&gt;
* Warning c647 if bound/1 is applied to a variable which is always free&lt;br /&gt;
* Warning if scope is only opened but is not actually used (unused open for class core is ignored). Removing such excessive open-directives makes the Optimal Includes more effective. This warning is switched off by the default (option /w:231 turns it on).&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC have been updated to be 64 bit compatible.  A few packages have not been updated, but have instead been deprecated and replaced by new packages.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;vpiEditor&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; editor)&lt;br /&gt;
* &amp;lt;vp&amp;gt;regExp&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== PFC/GUI ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; New editor control based on the [http://www.scintilla.org/ Scintilla] editor with lexers (including Visual Prolog lexer).&lt;br /&gt;
* &amp;lt;vp&amp;gt;webBrowser&amp;lt;/vp&amp;gt; New control control comprehensive wrapping of the Internet Explorer WebBrowserControl&lt;br /&gt;
* Improved clipboard handling (with HTML support)&lt;br /&gt;
* &amp;lt;vp&amp;gt;ribbonControl&amp;lt;/vp&amp;gt; and command system and controlSerialization; with a run-time visual designer that simplifies the process of making ribbons&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolboxControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;headerControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;rebar&amp;lt;/vp&amp;gt; + &amp;lt;vp&amp;gt;statusBar&amp;lt;/vp&amp;gt; New packages&lt;br /&gt;
* &amp;lt;vp&amp;gt;shellNotificationIcon&amp;lt;/vp&amp;gt; for handing notifications in the shells notification area + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolTip&amp;lt;/vp&amp;gt; New package and toolTip functionality on standard controls + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitControl&amp;lt;/vp&amp;gt; New control for multi-split management; with a run-time visual designer that simplifies the process of making splits&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitterControl&amp;lt;/vp&amp;gt; New control for the split in windows&lt;br /&gt;
* &amp;lt;vp&amp;gt;dragNdrop&amp;lt;/vp&amp;gt; New class for (in-program) drag and drop functionality + Demo&lt;br /&gt;
* Object oriented GDI support&lt;br /&gt;
* Object oriented GDI+ support for&lt;br /&gt;
** &amp;lt;vp&amp;gt;bitmap&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;brush&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;font&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;palette&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;pen&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;deviceContext&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;icon&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;gui_native::createDialogIndirectParam&amp;lt;/vp&amp;gt; Update for font handling&lt;br /&gt;
* &amp;lt;vp&amp;gt;window::listenUntilDestroy&amp;lt;/vp&amp;gt; New predicate for listening to an event, but detach the listening when the window is destroyed&lt;br /&gt;
* &amp;lt;vp&amp;gt;messageLoop&amp;lt;/vp&amp;gt; for SDI applications&lt;br /&gt;
&lt;br /&gt;
=== PFC (non-GUI) ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt; package based on [www.boost.org/libs/regex boost regular expression library]&lt;br /&gt;
* &amp;lt;vp&amp;gt;mapM_hash&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;setM_hash&amp;lt;/vp&amp;gt; New classes for hash table implementations of maps and sets&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM&amp;lt;/vp&amp;gt; uses pointer to memory instead of binary: makes it possible to interpret non-binaries as arrays and is more efficient&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_inline&amp;lt;/vp&amp;gt; New class for interpretation of C/C++ struct arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_boolean&amp;lt;/vp&amp;gt; New class for compact boolean arrays (1 bit per boolean).&lt;br /&gt;
* &amp;lt;vp&amp;gt;array2M&amp;lt;/vp&amp;gt; New class for 2 dimensional arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;socket&amp;lt;/vp&amp;gt; New class for object oriented WinSock2 support&lt;br /&gt;
* &amp;lt;vp&amp;gt;event0&amp;lt;/vp&amp;gt; - &amp;lt;vp&amp;gt;event7&amp;lt;/vp&amp;gt; New classes for general/generic event handling (notify+listener)&lt;br /&gt;
* &amp;lt;vp&amp;gt;iStream_stream&amp;lt;/vp&amp;gt; class for mapping a Visual Prolog stream as an IStream com object (CE-only)&lt;br /&gt;
* improved &amp;#039;&amp;#039;&amp;#039;ISAPI&amp;#039;&amp;#039;&amp;#039; support&lt;br /&gt;
* &amp;lt;vp&amp;gt;json&amp;lt;/vp&amp;gt; (pfc/web/json) and &amp;lt;vp&amp;gt;jsonRpc&amp;lt;/vp&amp;gt; New packages for JSON and JSON RPC 2.0 support (CE-only)&lt;br /&gt;
* memory allocate functions with argument for atomic/non-atomic&lt;br /&gt;
* ODBC auto parameter binding get the size from the database by means of SQLDescribeParam&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api::sHCreateStreamOnFileEx&amp;lt;/vp&amp;gt; new predicate for creating an IStream com object from a file&lt;br /&gt;
* &amp;lt;vp&amp;gt;xhtmlWriter&amp;lt;/vp&amp;gt; class for writing xhtml/xhtml5 using an &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;xmlReader&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt; based on the xmlLite API (CE-only) + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;internetExplorer&amp;lt;/vp&amp;gt; class for automating an out-of-process Internet Explorer&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
* New simplified settings dialog&lt;br /&gt;
* Add &amp;quot;No To All&amp;quot; button to the dialog for removing file from a project&lt;br /&gt;
* Create empty clause if there is compiler error for absent clause for a predicate&lt;br /&gt;
* Global unreachability support&lt;br /&gt;
* History of Run Arguments&lt;br /&gt;
* Improved Browse View&lt;br /&gt;
* Improved the manifest handling&lt;br /&gt;
* Load browse info in a separate thread (performance optimization)&lt;br /&gt;
* SDI applications support&lt;br /&gt;
* Tools entries in project-tree popup menu&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* Soft/hard breakpoints&lt;br /&gt;
* Add current class facts into the variable window&lt;br /&gt;
* Show class facts in the Variable Window for a class predicate&lt;br /&gt;
* Give names to objects&lt;br /&gt;
* Show &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; as dates and times.&lt;br /&gt;
* Show the error description for &amp;lt;vp&amp;gt;hResult&amp;lt;/vp&amp;gt; values.&lt;br /&gt;
* Watch Window improvement&lt;br /&gt;
* Copying the entire debug tree to the clipboard&lt;br /&gt;
* Improve memory view for 64bit and break points handling&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* win32.lib + win32.x64.lib updated to &amp;#039;&amp;#039;&amp;#039;Windows Software Development Kit (SDK) for Windows 8&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* PFC, VPI, IDE: Help button in the title bar&lt;br /&gt;
* SolutionManager. A utility for better handling of a collection of projects&lt;br /&gt;
* VipBuilder: Add /platform option for target machine&lt;br /&gt;
* VPI: Support DDE in SDI application&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7402 ===&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
*Compiler. Incorrect handling of some special floating-point constants leads to unexpected compile time errors (see [http://discuss.visual-prolog.com/viewtopic.php?t=9582 Real value 1.#INF is out of the range]).&lt;br /&gt;
*Compiler. Missing warning for unreachable codes (see [http://discuss.visual-prolog.com/viewtopic.php?t=9569 Unused Variable]).&lt;br /&gt;
*Compiler. [http://discuss.visual-prolog.com/viewtopic.php?t=9502 Ambiguity in wedBrowserControl].&lt;br /&gt;
*Compiler. Codes generation bug for string comparisson (it can lead to access violation exception at runtime in some cases).&lt;br /&gt;
*Compiler. Nested &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;-&amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;-&amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt; expressions can raise unexpected error messages related to the wrong flow patterns.&lt;br /&gt;
*Compiler. Unexpected error message for supported interface and inherited class conflict for a generic scope.&lt;br /&gt;
*Compiler. No error if constructor is absent for an object class with &amp;lt;vp&amp;gt;noDefaultConstructor&amp;lt;/vp&amp;gt; attribute.&lt;br /&gt;
*Compiler. Incorrect warning c231 (scope is opened but not used) in some cases.&lt;br /&gt;
*Compiler. Code generation bug for nested &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; statements with cuts in the &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt; part (this could could lead to exceptions at runtime in some cases).&lt;br /&gt;
*Compiler. Code generation bug for read-only property implemented by a clause with several heads.&lt;br /&gt;
*Compiler. Anonymous predicates in both &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as function and &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as predicate give declaration conflict.&lt;br /&gt;
*Compiler. Incorrect object file if number of fixups exceeds the limit of &amp;lt;vp&amp;gt;0xFFFF&amp;lt;/vp&amp;gt; (this could lead to the incorrect state of some statically initialized data, like class facts, etc.).&lt;br /&gt;
*Compiler. Several bugs in 64bit codes generation.&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
=== Build 7401 ===&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* if-the-else expressions&lt;br /&gt;
* Condition in if-statement/expression can be &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; calling convention&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
* ChainDB, 64bit: Problems when storing terms in a chain if &amp;quot;in_memory&amp;quot; is used&amp;lt;br&amp;gt;See [http://discuss.visual-prolog.com/viewtopic.php?t=9390 External Databases in V7.4 in 64bits]&lt;br /&gt;
* PFC: [http://discuss.visual-prolog.com/viewtopic.php?t=9377 Problem with console::setLocation in vip 7.4]&lt;br /&gt;
* VPI: Incorrect behavior of getText/1-&amp;gt;&lt;br /&gt;
* [http://discuss.visual-prolog.com/viewtopic.php?t=9421 Header prints in chinese!?!]&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Visual Prolog 7.4 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3637</id>
		<title>Visual Prolog 7.4 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3637"/>
		<updated>2013-06-04T04:17:40Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7402 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== 64 bit programs ===&lt;br /&gt;
&lt;br /&gt;
The main new feature in Visual Prolog 7.4 is the ability to generate 64 bit programs (Commercial Edition only), making it possible to write programs that exploit more of the computers resources.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notice&amp;#039;&amp;#039;&amp;#039; to ensure source code compatability between 32 and 64 bit programs a number of types have been changed and it is necessary to update the programs, see [[Visual Prolog 7.4 Upgrade Notes]].&lt;br /&gt;
&lt;br /&gt;
See also [[64 bit Windows]]&lt;br /&gt;
&lt;br /&gt;
=== Program Point ===&lt;br /&gt;
&lt;br /&gt;
Support for exceptions handling improvement (programPoint type and attribute, implicit programPoint argument).  See also [[Language Reference/Predicates#programPoint|programPoint]].&lt;br /&gt;
&lt;br /&gt;
=== Syntax &amp;amp; Warnings ===&lt;br /&gt;
&lt;br /&gt;
* Better handling of comma (,) before then, elseif, else, end if, do and end foreach&lt;br /&gt;
* Error c550 for inlining a field from a null pointer&lt;br /&gt;
* Warning c647 if bound/1 is applied to a variable which is always free&lt;br /&gt;
* Warning if scope is only opened but is not actually used (unused open for class core is ignored). Removing such excessive open-directives makes the Optimal Includes more effective. This warning is switched off by the default (option /w:231 turns it on).&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC have been updated to be 64 bit compatible.  A few packages have not been updated, but have instead been deprecated and replaced by new packages.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;vpiEditor&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; editor)&lt;br /&gt;
* &amp;lt;vp&amp;gt;regExp&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== PFC/GUI ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; New editor control based on the [http://www.scintilla.org/ Scintilla] editor with lexers (including Visual Prolog lexer).&lt;br /&gt;
* &amp;lt;vp&amp;gt;webBrowser&amp;lt;/vp&amp;gt; New control control comprehensive wrapping of the Internet Explorer WebBrowserControl&lt;br /&gt;
* Improved clipboard handling (with HTML support)&lt;br /&gt;
* &amp;lt;vp&amp;gt;ribbonControl&amp;lt;/vp&amp;gt; and command system and controlSerialization; with a run-time visual designer that simplifies the process of making ribbons&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolboxControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;headerControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;rebar&amp;lt;/vp&amp;gt; + &amp;lt;vp&amp;gt;statusBar&amp;lt;/vp&amp;gt; New packages&lt;br /&gt;
* &amp;lt;vp&amp;gt;shellNotificationIcon&amp;lt;/vp&amp;gt; for handing notifications in the shells notification area + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolTip&amp;lt;/vp&amp;gt; New package and toolTip functionality on standard controls + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitControl&amp;lt;/vp&amp;gt; New control for multi-split management; with a run-time visual designer that simplifies the process of making splits&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitterControl&amp;lt;/vp&amp;gt; New control for the split in windows&lt;br /&gt;
* &amp;lt;vp&amp;gt;dragNdrop&amp;lt;/vp&amp;gt; New class for (in-program) drag and drop functionality + Demo&lt;br /&gt;
* Object oriented GDI support&lt;br /&gt;
* Object oriented GDI+ support for&lt;br /&gt;
** &amp;lt;vp&amp;gt;bitmap&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;brush&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;font&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;palette&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;pen&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;deviceContext&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;icon&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;gui_native::createDialogIndirectParam&amp;lt;/vp&amp;gt; Update for font handling&lt;br /&gt;
* &amp;lt;vp&amp;gt;window::listenUntilDestroy&amp;lt;/vp&amp;gt; New predicate for listening to an event, but detach the listening when the window is destroyed&lt;br /&gt;
* &amp;lt;vp&amp;gt;messageLoop&amp;lt;/vp&amp;gt; for SDI applications&lt;br /&gt;
&lt;br /&gt;
=== PFC (non-GUI) ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt; package based on [www.boost.org/libs/regex boost regular expression library]&lt;br /&gt;
* &amp;lt;vp&amp;gt;mapM_hash&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;setM_hash&amp;lt;/vp&amp;gt; New classes for hash table implementations of maps and sets&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM&amp;lt;/vp&amp;gt; uses pointer to memory instead of binary: makes it possible to interpret non-binaries as arrays and is more efficient&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_inline&amp;lt;/vp&amp;gt; New class for interpretation of C/C++ struct arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_boolean&amp;lt;/vp&amp;gt; New class for compact boolean arrays (1 bit per boolean).&lt;br /&gt;
* &amp;lt;vp&amp;gt;array2M&amp;lt;/vp&amp;gt; New class for 2 dimensional arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;socket&amp;lt;/vp&amp;gt; New class for object oriented WinSock2 support&lt;br /&gt;
* &amp;lt;vp&amp;gt;event0&amp;lt;/vp&amp;gt; - &amp;lt;vp&amp;gt;event7&amp;lt;/vp&amp;gt; New classes for general/generic event handling (notify+listener)&lt;br /&gt;
* &amp;lt;vp&amp;gt;iStream_stream&amp;lt;/vp&amp;gt; class for mapping a Visual Prolog stream as an IStream com object (CE-only)&lt;br /&gt;
* improved &amp;#039;&amp;#039;&amp;#039;ISAPI&amp;#039;&amp;#039;&amp;#039; support&lt;br /&gt;
* &amp;lt;vp&amp;gt;json&amp;lt;/vp&amp;gt; (pfc/web/json) and &amp;lt;vp&amp;gt;jsonRpc&amp;lt;/vp&amp;gt; New packages for JSON and JSON RPC 2.0 support (CE-only)&lt;br /&gt;
* memory allocate functions with argument for atomic/non-atomic&lt;br /&gt;
* ODBC auto parameter binding get the size from the database by means of SQLDescribeParam&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api::sHCreateStreamOnFileEx&amp;lt;/vp&amp;gt; new predicate for creating an IStream com object from a file&lt;br /&gt;
* &amp;lt;vp&amp;gt;xhtmlWriter&amp;lt;/vp&amp;gt; class for writing xhtml/xhtml5 using an &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;xmlReader&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt; based on the xmlLite API (CE-only) + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;internetExplorer&amp;lt;/vp&amp;gt; class for automating an out-of-process Internet Explorer&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
* New simplified settings dialog&lt;br /&gt;
* Add &amp;quot;No To All&amp;quot; button to the dialog for removing file from a project&lt;br /&gt;
* Create empty clause if there is compiler error for absent clause for a predicate&lt;br /&gt;
* Global unreachability support&lt;br /&gt;
* History of Run Arguments&lt;br /&gt;
* Improved Browse View&lt;br /&gt;
* Improved the manifest handling&lt;br /&gt;
* Load browse info in a separate thread (performance optimization)&lt;br /&gt;
* SDI applications support&lt;br /&gt;
* Tools entries in project-tree popup menu&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* Soft/hard breakpoints&lt;br /&gt;
* Add current class facts into the variable window&lt;br /&gt;
* Show class facts in the Variable Window for a class predicate&lt;br /&gt;
* Give names to objects&lt;br /&gt;
* Show &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; as dates and times.&lt;br /&gt;
* Show the error description for &amp;lt;vp&amp;gt;hResult&amp;lt;/vp&amp;gt; values.&lt;br /&gt;
* Watch Window improvement&lt;br /&gt;
* Copying the entire debug tree to the clipboard&lt;br /&gt;
* Improve memory view for 64bit and break points handling&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* win32.lib + win32.x64.lib updated to &amp;#039;&amp;#039;&amp;#039;Windows Software Development Kit (SDK) for Windows 8&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* PFC, VPI, IDE: Help button in the title bar&lt;br /&gt;
* SolutionManager. A utility for better handling of a collection of projects&lt;br /&gt;
* VipBuilder: Add /platform option for target machine&lt;br /&gt;
* VPI: Support DDE in SDI application&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7402 ===&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
*Compiler. Incorrect handling of some special floating-point constants leads to unexpected compile time errors (see [http://discuss.visual-prolog.com/viewtopic.php?t=9582 Real value 1.#INF is out of the range]).&lt;br /&gt;
*Compiler. Missing warning for unreachable codes (see [http://discuss.visual-prolog.com/viewtopic.php?t=9569 Unused Variable]).&lt;br /&gt;
*Compiler. [http://discuss.visual-prolog.com/viewtopic.php?t=9502 Ambiguity in wedBrowserControl].&lt;br /&gt;
*Compiler. Codes generation bug for string comparisson (it can lead to access violation exception at runtime in some cases).&lt;br /&gt;
*Compiler. Nested &amp;#039;&amp;#039;&amp;#039;if-then-else&amp;#039;&amp;#039;&amp;#039; expressions can raise unexpected error messages related to the wrong flow patterns.&lt;br /&gt;
*Compiler. Unexpected error message for supported interface and inherited class conflict for a generic scope.&lt;br /&gt;
*Compiler. No error if constructor is absent for an object class with &amp;#039;&amp;#039;noDefaultConstructor&amp;#039;&amp;#039; attribute.&lt;br /&gt;
*Compiler. Incorrect warning c231 (scope is opened but not used) in some cases.&lt;br /&gt;
*Compiler. Code generation bug for nested &amp;#039;&amp;#039;&amp;#039;finally&amp;#039;&amp;#039;&amp;#039; statements with cuts in &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039; part (this could could lead to exceptions at runtime in some cases).&lt;br /&gt;
*Compiler. Code generation bug for read-only property implemented by a clause with several heads.&lt;br /&gt;
*Compiler. Anonymous predicates in both &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as function and &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as predicate give declaration conflict.&lt;br /&gt;
*Compiler. Incorrect object file if number of fixups exceeds the limit of oxFFFF (this could lead to the incorrect state of some statically initialized data, like class facts, etc.).&lt;br /&gt;
*Compiler. Several bugs in 64bit codes generation.&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
=== Build 7401 ===&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* if-the-else expressions&lt;br /&gt;
* Condition in if-statement/expression can be &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; calling convention&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
* ChainDB, 64bit: Problems when storing terms in a chain if &amp;quot;in_memory&amp;quot; is used&amp;lt;br&amp;gt;See [http://discuss.visual-prolog.com/viewtopic.php?t=9390 External Databases in V7.4 in 64bits]&lt;br /&gt;
* PFC: [http://discuss.visual-prolog.com/viewtopic.php?t=9377 Problem with console::setLocation in vip 7.4]&lt;br /&gt;
* VPI: Incorrect behavior of getText/1-&amp;gt;&lt;br /&gt;
* [http://discuss.visual-prolog.com/viewtopic.php?t=9421 Header prints in chinese!?!]&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Visual Prolog 7.4 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3636</id>
		<title>Visual Prolog 7.4 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.4_New_Features&amp;diff=3636"/>
		<updated>2013-06-04T04:12:17Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7402 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== 64 bit programs ===&lt;br /&gt;
&lt;br /&gt;
The main new feature in Visual Prolog 7.4 is the ability to generate 64 bit programs (Commercial Edition only), making it possible to write programs that exploit more of the computers resources.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notice&amp;#039;&amp;#039;&amp;#039; to ensure source code compatability between 32 and 64 bit programs a number of types have been changed and it is necessary to update the programs, see [[Visual Prolog 7.4 Upgrade Notes]].&lt;br /&gt;
&lt;br /&gt;
See also [[64 bit Windows]]&lt;br /&gt;
&lt;br /&gt;
=== Program Point ===&lt;br /&gt;
&lt;br /&gt;
Support for exceptions handling improvement (programPoint type and attribute, implicit programPoint argument).  See also [[Language Reference/Predicates#programPoint|programPoint]].&lt;br /&gt;
&lt;br /&gt;
=== Syntax &amp;amp; Warnings ===&lt;br /&gt;
&lt;br /&gt;
* Better handling of comma (,) before then, elseif, else, end if, do and end foreach&lt;br /&gt;
* Error c550 for inlining a field from a null pointer&lt;br /&gt;
* Warning c647 if bound/1 is applied to a variable which is always free&lt;br /&gt;
* Warning if scope is only opened but is not actually used (unused open for class core is ignored). Removing such excessive open-directives makes the Optimal Includes more effective. This warning is switched off by the default (option /w:231 turns it on).&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC have been updated to be 64 bit compatible.  A few packages have not been updated, but have instead been deprecated and replaced by new packages.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;vpiEditor&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; editor)&lt;br /&gt;
* &amp;lt;vp&amp;gt;regExp&amp;lt;/vp&amp;gt; is deprecated (replaced by &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== PFC/GUI ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;sciLexer&amp;lt;/vp&amp;gt; New editor control based on the [http://www.scintilla.org/ Scintilla] editor with lexers (including Visual Prolog lexer).&lt;br /&gt;
* &amp;lt;vp&amp;gt;webBrowser&amp;lt;/vp&amp;gt; New control control comprehensive wrapping of the Internet Explorer WebBrowserControl&lt;br /&gt;
* Improved clipboard handling (with HTML support)&lt;br /&gt;
* &amp;lt;vp&amp;gt;ribbonControl&amp;lt;/vp&amp;gt; and command system and controlSerialization; with a run-time visual designer that simplifies the process of making ribbons&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolboxControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;headerControl&amp;lt;/vp&amp;gt; New control&lt;br /&gt;
* &amp;lt;vp&amp;gt;rebar&amp;lt;/vp&amp;gt; + &amp;lt;vp&amp;gt;statusBar&amp;lt;/vp&amp;gt; New packages&lt;br /&gt;
* &amp;lt;vp&amp;gt;shellNotificationIcon&amp;lt;/vp&amp;gt; for handing notifications in the shells notification area + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;toolTip&amp;lt;/vp&amp;gt; New package and toolTip functionality on standard controls + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitControl&amp;lt;/vp&amp;gt; New control for multi-split management; with a run-time visual designer that simplifies the process of making splits&lt;br /&gt;
* &amp;lt;vp&amp;gt;splitterControl&amp;lt;/vp&amp;gt; New control for the split in windows&lt;br /&gt;
* &amp;lt;vp&amp;gt;dragNdrop&amp;lt;/vp&amp;gt; New class for (in-program) drag and drop functionality + Demo&lt;br /&gt;
* Object oriented GDI support&lt;br /&gt;
* Object oriented GDI+ support for&lt;br /&gt;
** &amp;lt;vp&amp;gt;bitmap&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;brush&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;font&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;palette&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;pen&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;deviceContext&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;icon&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;gui_native::createDialogIndirectParam&amp;lt;/vp&amp;gt; Update for font handling&lt;br /&gt;
* &amp;lt;vp&amp;gt;window::listenUntilDestroy&amp;lt;/vp&amp;gt; New predicate for listening to an event, but detach the listening when the window is destroyed&lt;br /&gt;
* &amp;lt;vp&amp;gt;messageLoop&amp;lt;/vp&amp;gt; for SDI applications&lt;br /&gt;
&lt;br /&gt;
=== PFC (non-GUI) ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;regEx&amp;lt;/vp&amp;gt; package based on [www.boost.org/libs/regex boost regular expression library]&lt;br /&gt;
* &amp;lt;vp&amp;gt;mapM_hash&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;setM_hash&amp;lt;/vp&amp;gt; New classes for hash table implementations of maps and sets&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM&amp;lt;/vp&amp;gt; uses pointer to memory instead of binary: makes it possible to interpret non-binaries as arrays and is more efficient&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_inline&amp;lt;/vp&amp;gt; New class for interpretation of C/C++ struct arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;arrayM_boolean&amp;lt;/vp&amp;gt; New class for compact boolean arrays (1 bit per boolean).&lt;br /&gt;
* &amp;lt;vp&amp;gt;array2M&amp;lt;/vp&amp;gt; New class for 2 dimensional arrays&lt;br /&gt;
* &amp;lt;vp&amp;gt;socket&amp;lt;/vp&amp;gt; New class for object oriented WinSock2 support&lt;br /&gt;
* &amp;lt;vp&amp;gt;event0&amp;lt;/vp&amp;gt; - &amp;lt;vp&amp;gt;event7&amp;lt;/vp&amp;gt; New classes for general/generic event handling (notify+listener)&lt;br /&gt;
* &amp;lt;vp&amp;gt;iStream_stream&amp;lt;/vp&amp;gt; class for mapping a Visual Prolog stream as an IStream com object (CE-only)&lt;br /&gt;
* improved &amp;#039;&amp;#039;&amp;#039;ISAPI&amp;#039;&amp;#039;&amp;#039; support&lt;br /&gt;
* &amp;lt;vp&amp;gt;json&amp;lt;/vp&amp;gt; (pfc/web/json) and &amp;lt;vp&amp;gt;jsonRpc&amp;lt;/vp&amp;gt; New packages for JSON and JSON RPC 2.0 support (CE-only)&lt;br /&gt;
* memory allocate functions with argument for atomic/non-atomic&lt;br /&gt;
* ODBC auto parameter binding get the size from the database by means of SQLDescribeParam&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api::sHCreateStreamOnFileEx&amp;lt;/vp&amp;gt; new predicate for creating an IStream com object from a file&lt;br /&gt;
* &amp;lt;vp&amp;gt;xhtmlWriter&amp;lt;/vp&amp;gt; class for writing xhtml/xhtml5 using an &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;xmlReader&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;xmlWriter&amp;lt;/vp&amp;gt; based on the xmlLite API (CE-only) + Demo&lt;br /&gt;
* &amp;lt;vp&amp;gt;internetExplorer&amp;lt;/vp&amp;gt; class for automating an out-of-process Internet Explorer&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
* New simplified settings dialog&lt;br /&gt;
* Add &amp;quot;No To All&amp;quot; button to the dialog for removing file from a project&lt;br /&gt;
* Create empty clause if there is compiler error for absent clause for a predicate&lt;br /&gt;
* Global unreachability support&lt;br /&gt;
* History of Run Arguments&lt;br /&gt;
* Improved Browse View&lt;br /&gt;
* Improved the manifest handling&lt;br /&gt;
* Load browse info in a separate thread (performance optimization)&lt;br /&gt;
* SDI applications support&lt;br /&gt;
* Tools entries in project-tree popup menu&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* Soft/hard breakpoints&lt;br /&gt;
* Add current class facts into the variable window&lt;br /&gt;
* Show class facts in the Variable Window for a class predicate&lt;br /&gt;
* Give names to objects&lt;br /&gt;
* Show &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; as dates and times.&lt;br /&gt;
* Show the error description for &amp;lt;vp&amp;gt;hResult&amp;lt;/vp&amp;gt; values.&lt;br /&gt;
* Watch Window improvement&lt;br /&gt;
* Copying the entire debug tree to the clipboard&lt;br /&gt;
* Improve memory view for 64bit and break points handling&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* win32.lib + win32.x64.lib updated to &amp;#039;&amp;#039;&amp;#039;Windows Software Development Kit (SDK) for Windows 8&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* PFC, VPI, IDE: Help button in the title bar&lt;br /&gt;
* SolutionManager. A utility for better handling of a collection of projects&lt;br /&gt;
* VipBuilder: Add /platform option for target machine&lt;br /&gt;
* VPI: Support DDE in SDI application&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7402 ===&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
*Compiler. Incorrect handling of some special floating-point constants leads to unexpected compile time errors (see [http://discuss.visual-prolog.com/viewtopic.php?t=9582]).&lt;br /&gt;
*Compiler. Missing warning for unreachable codes (see [http://discuss.visual-prolog.com/viewtopic.php?t=9569]).&lt;br /&gt;
*Compiler. Ambiguity in wedBrowserControl (see [http://discuss.visual-prolog.com/viewtopic.php?t=9502]).&lt;br /&gt;
*Compiler. Codes generation bug for string comparisson (it can lead to access violation exception at runtime in some cases).&lt;br /&gt;
*Compiler. Nested &amp;#039;&amp;#039;&amp;#039;if-then-else&amp;#039;&amp;#039;&amp;#039; expressions can raise unexpected error messages related to the wrong flow patterns.&lt;br /&gt;
*Compiler. Unexpected error message for supported interface and inherited class conflict for a generic scope.&lt;br /&gt;
*Compiler. No error if constructor is absent for an object class with &amp;#039;&amp;#039;noDefaultConstructor&amp;#039;&amp;#039; attribute.&lt;br /&gt;
*Compiler. Incorrect warning c231 (scope is opened but not used) in some cases.&lt;br /&gt;
*Compiler. Code generation bug for nested &amp;#039;&amp;#039;&amp;#039;finally&amp;#039;&amp;#039;&amp;#039; statements with cuts in &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039; part (this could could lead to exceptions at runtime in some cases).&lt;br /&gt;
*Compiler. Code generation bug for read-only property implemented by a clause with several heads.&lt;br /&gt;
*Compiler. Anonymous predicates in both &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as function and &amp;#039;&amp;#039;xxx&amp;#039;&amp;#039; as predicate give declaration conflict.&lt;br /&gt;
*Compiler. Incorrect object file if number of fixups exceeds the limit of oxFFFF (this could lead to the incorrect state of some statically initialized data, like class facts, etc.).&lt;br /&gt;
*Compiler. Several bugs in 64bit codes generation.&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
=== Build 7401 ===&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* if-the-else expressions&lt;br /&gt;
* Condition in if-statement/expression can be &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; calling convention&lt;br /&gt;
&lt;br /&gt;
Important bug fixes:&lt;br /&gt;
&lt;br /&gt;
* ChainDB, 64bit: Problems when storing terms in a chain if &amp;quot;in_memory&amp;quot; is used&amp;lt;br&amp;gt;See [http://discuss.visual-prolog.com/viewtopic.php?t=9390 External Databases in V7.4 in 64bits]&lt;br /&gt;
* PFC: [http://discuss.visual-prolog.com/viewtopic.php?t=9377 Problem with console::setLocation in vip 7.4]&lt;br /&gt;
* VPI: Incorrect behavior of getText/1-&amp;gt;&lt;br /&gt;
* [http://discuss.visual-prolog.com/viewtopic.php?t=9421 Header prints in chinese!?!]&lt;br /&gt;
&lt;br /&gt;
+ Some minor bug fixes&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Visual Prolog 7.4 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2907</id>
		<title>Language Reference/Domains</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2907"/>
		<updated>2012-12-19T08:16:48Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Calling Convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Domains}}&lt;br /&gt;
&lt;br /&gt;
=== Domains Sections ===&lt;br /&gt;
&lt;br /&gt;
A domain section defines a set of domains in the current scope (see {{lang|Interfaces|Interface}}, {{lang|Classes|Class Declaration}}, and {{lang|Implementations|Class Implementation}}).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainsSection&amp;gt;:&lt;br /&gt;
    domains &amp;lt;DomainDefinition&amp;gt;-dot-term-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Domain Definitions ===&lt;br /&gt;
&lt;br /&gt;
A domain definition defines a named domain in the current scope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain on the right hand side denotes an interface or a compound domain, then the defined domain is synonym (i.e. identical) to the type expression. Otherwise the defined domain becomes a subtype of the domain denoted by the type expression. Here a domain name &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
There are certain places where you must use a domain name rather than a type expression:&lt;br /&gt;
&lt;br /&gt;
*as a declaration of a formal argument type;&lt;br /&gt;
*as a type of a constant or a fact variable;&lt;br /&gt;
*as a type in a list domain.&lt;br /&gt;
&lt;br /&gt;
=== Type Expressions ===&lt;br /&gt;
&lt;br /&gt;
A type expression denotes a type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeExpression&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt;&lt;br /&gt;
    &amp;lt;CompoundDomain&amp;gt;&lt;br /&gt;
    &amp;lt;ListDomain&amp;gt;&lt;br /&gt;
    &amp;lt;PredicateDomain&amp;gt;&lt;br /&gt;
    &amp;lt;IntegralDomain&amp;gt;&lt;br /&gt;
    &amp;lt;RealDomain&amp;gt;&lt;br /&gt;
    &amp;lt;TypeVariable&amp;gt;&lt;br /&gt;
    &amp;lt;ScopeTypeVariable&amp;gt;&lt;br /&gt;
    &amp;lt;TypeApplication&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Type Names ====&lt;br /&gt;
&lt;br /&gt;
A type name is either an &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; name or the name of a &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039;. We use the term &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039; to specify domains whose elements are {{lang2|Basic_Concepts|Types|immutable}} (unchangeable). Here we can say that objects, belonging to domains correspondent to &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; names, have mutable state and terms of any other domains are immutable. So actually value types are everything except object types. A type name (obviously) denotes the type corresponding to the name of an existing domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeName&amp;gt;:&lt;br /&gt;
    &amp;lt;InterfaceName&amp;gt;&lt;br /&gt;
    &amp;lt;DomainName&amp;gt;&lt;br /&gt;
    &amp;lt;ClassQualifiedDomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassQualifiedDomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;ClassName&amp;gt;::&amp;lt;DomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;&amp;lt;/vpbnf&amp;gt; is an interface name, &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a value domain name, and &amp;lt;vpbnf&amp;gt;&amp;lt;ClassName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a class name.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    newDomain1 = existingDomain.&lt;br /&gt;
    newDomain2 = myInterface.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the domain name &amp;lt;vp&amp;gt;existingDomain&amp;lt;/vp&amp;gt; and the interface name &amp;lt;vp&amp;gt;myInterface&amp;lt;/vp&amp;gt; are used to define new domains.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Compound Domains ====&lt;br /&gt;
&lt;br /&gt;
Compound domains (also known as algebraic data types) are used to represent lists, trees, and other tree structured values. In its simple forms compound domains are used to represent structures and enumeration values. Compound domains can have a recursive definition. They can also be mutually/indirectly recursive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CompoundDomain&amp;gt;:&lt;br /&gt;
   &amp;lt;Alignment&amp;gt;-opt &amp;lt;FunctorAlternative&amp;gt;-semicolon-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Alignment&amp;gt;:&lt;br /&gt;
    align &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to an integral value.&lt;br /&gt;
&lt;br /&gt;
A compound domain declaration declares a list of functor alternatives with optional alignment. Alignment must be &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;2&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;4&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a compound domain consists of one functor alternative, then it is considered as structure and has representation, which is binary compatible with the appropriate structure in language C.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorAlternative&amp;gt;: &lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; &amp;lt;FunctorName&amp;gt; ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorName&amp;gt;&amp;lt;/vpbnf&amp;gt; is the name of a functor alternative it should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;ArgumentName&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any {{lang2|Lexical_Elements|Identifiers|upper case identifier}}. The compiler ignores it.&lt;br /&gt;
&lt;br /&gt;
Compound domains  have no subtype relations to any other domains.&lt;br /&gt;
&lt;br /&gt;
If a domain is defined as being equal to a compound domain, then these two domains are synonym types rather than subtypes. Meaning that they are just two different names for the same type.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    t1 = ff(); gg(integer, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the two-ary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes an {{lang2|Built-in_entities|integer|integer}} and a term of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; itself as arguments. So the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is recursively defined.&lt;br /&gt;
&lt;br /&gt;
The following expressions are terms of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff()&lt;br /&gt;
gg(77, ff())&lt;br /&gt;
gg(33, gg(44, gg(55, ff())))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = ff(); gg(t2). &lt;br /&gt;
    t2 = hh(t1, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the unary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes a term of the domain &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; as argument. &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is a compound domain with one alternative the functor &amp;lt;vp&amp;gt;hh&amp;lt;/vp&amp;gt;, which takes two &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; terms as argument. So the domains &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are mutually recursive.&lt;br /&gt;
&lt;br /&gt;
The following are terms in the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff() &lt;br /&gt;
gg(hh(ff(), ff())) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), ff())) &lt;br /&gt;
ggg(hh(ff(), g(hh(ff(), ff())))) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), gg(hh(ff(), ff()))))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&lt;br /&gt;
In this example &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are synonym types.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(); g(integer). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Normally, it is not necessary to use empty parenthesis after null-ary functors. But in a domain definition consisting only of a single null-ary functor, empty parenthesis are required to distinguish it from a synonym/subtype definition.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with a single null-ary functor, whereas &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is defined to be synonym to &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== List Domains ====&lt;br /&gt;
&lt;br /&gt;
List domains represent sequences of values of a certain domain. Thus, all elements in a &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; list must be of type &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListDomain&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt; *&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;T*&amp;lt;/vp&amp;gt; is the type of lists of &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
The following syntax is used for lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListExpression&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list-opt ]&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list | &amp;lt;Tail&amp;gt; ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Tail&amp;gt;:&lt;br /&gt;
    &amp;lt;Term&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Tail&amp;gt;&amp;lt;/vpbnf&amp;gt; is a term which should have a value of the &amp;lt;vpbnf&amp;gt;&amp;lt;ListDomain&amp;gt;&amp;lt;/vpbnf&amp;gt; type. Each &amp;lt;vpbnf&amp;gt;&amp;lt;Term&amp;gt;&amp;lt;/vpbnf&amp;gt; should be of {{lang2|Domains|Type_Names|typeName}} type.&lt;br /&gt;
&lt;br /&gt;
Actually, lists are just compound domains with two functors: &amp;lt;vp&amp;gt;[]&amp;lt;/vp&amp;gt; denoting the empty list and the mix-fix functor &amp;lt;vp&amp;gt;[HD|TL]&amp;lt;/vp&amp;gt; denoting the list with head &amp;lt;vp&amp;gt;HD&amp;lt;/vp&amp;gt; and tail &amp;lt;vp&amp;gt;TL&amp;lt;/vp&amp;gt;. The head must be of the underlying element type, whereas the tail must be a list of relevant type.&lt;br /&gt;
&lt;br /&gt;
Lists are however syntactically sugared.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En | L ]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | L ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1, E2, E3, ..., En |[}}&amp;lt;/vp&amp;gt;, which in turn is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | [] ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Predicate Domains ====&lt;br /&gt;
&lt;br /&gt;
Values of a predicate domain are predicates with the same &amp;quot;signature&amp;quot;, i.e. the same argument and return types, the same flow pattern and the same (or stronger) predicate mode.&lt;br /&gt;
&lt;br /&gt;
A predicate that returns a value is called a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, whereas a predicate that does not return a value is sometimes called an &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;ordinary&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; predicate, to stress that it is not a function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDomain&amp;gt;:&lt;br /&gt;
   ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt ) &amp;lt;ReturnArgument&amp;gt;-opt &lt;br /&gt;
   &amp;lt;PredicateModeAndFlow&amp;gt;-list-opt &amp;lt;CallingConvention&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
   &amp;lt;PredicateArgumentType&amp;gt; &amp;lt;VariableName&amp;gt;-opt&lt;br /&gt;
   &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ReturnArgument&amp;gt;:&lt;br /&gt;
    -&amp;gt; &amp;lt;FormalArgument&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateArgumentType&amp;gt;:&lt;br /&gt;
   &amp;lt;TypeName&amp;gt;&lt;br /&gt;
   &amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;VariableName&amp;gt;:&lt;br /&gt;
   &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;&amp;lt;/vpbnf&amp;gt; argument as the last &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;&amp;lt;/vpbnf&amp;gt; in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;-comma-sep-list&amp;lt;/vpbnf&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vpbnf&amp;gt; as a {{lang2|Domains|Type_Expressions|predicateArgumentType}} to specify that the argument can be of any type.&lt;br /&gt;
&lt;br /&gt;
Currently, predicate domains with ellipsis can only be used in predicate declarations.&lt;br /&gt;
&lt;br /&gt;
Predicate domains that are used in domain definitions can at most state one flow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateModeAndFlow&amp;gt;:&lt;br /&gt;
     &amp;lt;PredicateMode&amp;gt;-opt&lt;br /&gt;
     &amp;lt;FlowPattern&amp;gt;-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Predicate Mode =====&lt;br /&gt;
&lt;br /&gt;
The specified predicate mode applies for each member of a flow pattern list following it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateMode&amp;gt;: one of&lt;br /&gt;
   erroneous &lt;br /&gt;
   failure &lt;br /&gt;
   procedure &lt;br /&gt;
   determ &lt;br /&gt;
   multi &lt;br /&gt;
   nondeterm&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate modes can be described by the following sets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;erroneous = {} &lt;br /&gt;
failure = {Fail} &lt;br /&gt;
procedure = {Succeed} &lt;br /&gt;
determ = {Fail, Succeed} &lt;br /&gt;
multi = {Succeed, BacktrackPoint} &lt;br /&gt;
nondeterm = {Fail, Succeed, BacktrackPoint}&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;Fail&amp;#039;&amp;#039; is in the set it means that the predicate can fail. If &amp;#039;&amp;#039;succeed&amp;#039;&amp;#039; is in the set it means that the predicate can succeed. If &amp;#039;&amp;#039;BacktrackPoint&amp;#039;&amp;#039; is in the set it means that the predicate can return with an active backtrack point in it.&lt;br /&gt;
&lt;br /&gt;
If such a set, say &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;, is a subset of another set, say &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;, then we say that the mode is stronger than the other, i.e. &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt; is stronger than &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A predicate domain actually contain all predicates (with correct type and flow), which have the mode specified or a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;stronger&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; mode.&lt;br /&gt;
&lt;br /&gt;
It is illegal to state a predicate mode for constructors, they always have the &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; mode.&lt;br /&gt;
&lt;br /&gt;
Omitting of a predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Omitting of flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Notice that, in difference to Visual Prolog v. 5.x, inside implementations (i.e. for a local predicates) the needed flows and modes &amp;#039;&amp;#039;&amp;#039;are NOT derived from the usages of the predicate&amp;#039;&amp;#039;&amp;#039;. Now in declarations of for local predicates omitting the predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; and omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
If inside an implementation you do not want to specify all possible flows of a predicate usage explicitly, you still can deliver this duty to the compiler. For this task inside class implementations you can use the special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt;. In this case the compiler during the compilation will derive the needed flows from usages of the predicate. But if the optional preceding predicate mode is omitted before the &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; flow pattern, then the &amp;lt;vp&amp;gt;procedure mode&amp;lt;/vp&amp;gt; is always assumed.&lt;br /&gt;
&lt;br /&gt;
===== Flow Pattern =====&lt;br /&gt;
&lt;br /&gt;
The flow pattern defines the input/output direction of the arguments, which in combination with functor domains can be structures with parts of a single argument being input and other parts of the same argument being output.&lt;br /&gt;
&lt;br /&gt;
A flow pattern consists of a sequence of flows, each flow corresponds to an argument (fist flow to first argument, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FlowPattern&amp;gt;:&lt;br /&gt;
     ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt ) AnyFlow&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Flow&amp;gt;: one of&lt;br /&gt;
    i&lt;br /&gt;
    o &lt;br /&gt;
    &amp;lt;FunctorFlow&amp;gt;&lt;br /&gt;
    &amp;lt;ListFlow&amp;gt;&lt;br /&gt;
    &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ellipsis flow must match an ellipsis argument and can therefore be only the last flow in the flow pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;:&lt;br /&gt;
    ...&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;&amp;lt;/vpbnf&amp;gt; states a functor and flows of each of the components of that flow. The functor must of course be in the domain of the corresponding argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;:&lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow declaration cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
List flows are just like functor flows, but with the same syntactic sugaring as the list domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlow&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Flow&amp;gt;-comma-sep-list-opt &amp;lt;ListFlowTail&amp;gt;-opt]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlowTail&amp;gt;:&lt;br /&gt;
    | &amp;lt;Flow&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A list flow cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
When declaring a predicate the flow can be omitted. Inside an implementation (i.e. for a local predicate) the needed flows are derived from the usages of the predicate. Inside an interface or a class declaration (i.e. for a public predicate) omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; can be stated only in declarations of local predicates (i.e. in predicate declarations inside the implementation of a class). It means that the exact flow pattern will be evaluated during the compilation. If the optional preceding predicate mode is omitted for this flow pattern, then it assumes to be a &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp1 = (integer Argument1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; is a predicate domain. The predicates that have type &amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; takes one {{lang2|Built-in_entities|integer|integer}} argument. Since no flow-pattern is stated the argument is input, and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp2 = (integer Argument1) -&amp;gt; integer ReturnType.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicates of type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; take one {{lang2|Built-in_entities|integer|integer}} argument and returns a value of type {{lang2|Built-in_entities|integer|integer}}. Therefore, &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; is actually a function domain and the predicates that have type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; are actually functions. Since no flow-pattern is stated the argument is input and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    ppp : (integer Argument1, integer Argument2) determ (o,i) (i,o) nondeterm (o,o).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; takes two {{lang2|Built-in_entities|integer|integer}} arguments. It exists in three flow variants: &amp;lt;vp&amp;gt;(o,i)&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;(i,o)&amp;lt;/vp&amp;gt;, which are &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;(o,o)&amp;lt;/vp&amp;gt;, which is &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Calling Convention =====&lt;br /&gt;
&lt;br /&gt;
The calling convention determines how arguments, etc. are passed to the predicate, it also determines how the link name is derived from a predicate name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConvention&amp;gt;:&lt;br /&gt;
     language &amp;lt;CallingConventionKind&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConventionKind&amp;gt;: one of&lt;br /&gt;
     c thiscall stdcall apicall prolog&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a calling convention is not stated, then the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; convention is assumed. The &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention is the standard convention used for Prolog predicates.&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; follows the C/C++ standard calling convention. The link name of a predicate is created from the predicate name by adding a leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; follows the C++ standard calling convention for virtual functions. This calling convention uses the &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy but sometimes it may use the different argument and stack handling rules. Calling convention &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; can be applied to the object predicates only.&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; uses the &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy but it uses the different argument and stack handling rules. The following table shows the implementation of &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling convention:&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Feature&lt;br /&gt;
!Implementation&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing order&lt;br /&gt;
|Right to left.&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing convention&lt;br /&gt;
|By value, unless a compound domain term is passed. So it cannot be used to predicates with variable number of arguments.&lt;br /&gt;
|-&lt;br /&gt;
|Stack-maintenance responsibility&lt;br /&gt;
|Called predicate pops its own arguments from the stack.&lt;br /&gt;
|-&lt;br /&gt;
|Name-decoration convention&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|Case-translation convention&lt;br /&gt;
|No case translation of the predicate name is performed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the same argument and stack handling rules as &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, but for convenience to call MS Windows API functions &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the naming conventions that are used by most MS Windows API functions. According to &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; naming conventions the link name of a predicate is constructed as follows:&lt;br /&gt;
&lt;br /&gt;
*an leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name;&lt;br /&gt;
*the predicate name in which the first letter is changed in to a capital letter;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed, if the arguments and the return type indicate an ANSI, Unicode or neutral predicate, respectively;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt;&amp;#039; is suffixed;&lt;br /&gt;
*the number of bytes pushed on the call stack is suffixed.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     predicateName : (integer, string) language apicall&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument types of this predicate indicates that it is a Unicode predicate (as {{lang2|Built-in_entities|string|string}} is the domain of Unicode strings). An {{lang2|Built-in_entities|integer|integer}} and a {{lang2|Built-in_entities|string|string}} each occupies 4 bytes on the call stack and, therefore, the link name becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;_PredicateNameW@8&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; is used together with the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction the name stated in the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction is decorated in the same manner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; can only be used directly in a predicate declaration, not in a predicate domain definition. In predicate domain definitions &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, must be used instead. A predicate declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention cannot have clauses and it also cannot be resolved externally without explicit DLL name.&lt;br /&gt;
&lt;br /&gt;
The following table compares implementations of &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling conventions (the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention has the special implementation, which is not discussed here):&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Keyword&lt;br /&gt;
!Stack cleanup&lt;br /&gt;
!Predicate name case-translation&lt;br /&gt;
!Link predicate name decoration convention&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Calling&amp;#039;&amp;#039;&amp;#039; predicate pops the arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Calling&amp;#039;&amp;#039;&amp;#039; predicate pops the arguments from the stack except the implicit &amp;#039;&amp;#039;&amp;#039;This&amp;#039;&amp;#039;&amp;#039; argument which is passed in the register.&lt;br /&gt;
|None.&lt;br /&gt;
|&amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy is used.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|The first letter of the predicate name is changed to the capital letter.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the name. The first letter is changed to the upper case. The &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed. The sign &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; is suffixed. The (decimal) number of bytes in the argument list is suffixed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Visual Prolog notion of predicate domains covers both class and object members. Class members are handled straight forward, but the handling of object members requires attention. The invocation of an object predicate will get &amp;quot;back&amp;quot; in the context of the object to which the member belongs.&lt;br /&gt;
&lt;br /&gt;
{{Example| Assume the following declarations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface actionEventSource&lt;br /&gt;
domains&lt;br /&gt;
     actionListener = (actionEventSource Source) procedure (i).&lt;br /&gt;
predicates&lt;br /&gt;
     addActionListener : (actionListener Listener) procedure (i).&lt;br /&gt;
     ... end interface&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also assume a class &amp;lt;vp&amp;gt;button_class&amp;lt;/vp&amp;gt; which supports the &amp;lt;vp&amp;gt;actionEventSource&amp;lt;/vp&amp;gt;. The event is sent when the button is pressed. In &amp;lt;vp&amp;gt;myDialog_class&amp;lt;/vp&amp;gt; class, which implements a dialog, I create a button and I want to listen to its action events, so that I can react on button presses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement myDialog_class &lt;br /&gt;
clauses&lt;br /&gt;
    new() :-&lt;br /&gt;
        OkButton = button_class::new(...),&lt;br /&gt;
        OkButton:addActionListener(onOk),&lt;br /&gt;
        ...&lt;br /&gt;
facts&lt;br /&gt;
    okPressed : () determ.&lt;br /&gt;
predicates&lt;br /&gt;
    onOk : actionListener.&lt;br /&gt;
clauses&lt;br /&gt;
    onOk(Source) :-&lt;br /&gt;
        assert(okPressed()).&lt;br /&gt;
end implement&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important thing about the example is that &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; is an object member and that, when the button is pressed, the invocation of the registered &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; will bring us back in the object that owns &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt;. This means that we have access to the object fact &amp;lt;vp&amp;gt;okPressed&amp;lt;/vp&amp;gt;, so that we can assert it.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Format Strings =====&lt;br /&gt;
&lt;br /&gt;
A formal parameter to a predicate can be marked as format string using the attribute {{lang2|Attributes|formatString|formatString}}. The format string can contain ordinary characters which are printed without modification, and format fields, that % begins with the percent &amp;#039;%&amp;#039; sign. If the percent sign is followed % by some unknown character (not the format specifier) - then % this character will  be printed without modifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     writef : (string Format [formatstring], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format fields specification is: &lt;br /&gt;
&lt;br /&gt;
[-][0][width][.precision][type] &lt;br /&gt;
&lt;br /&gt;
All fields are optional. &lt;br /&gt;
&lt;br /&gt;
[-] Hyphen indicates that the field is to be left justified; right justified is the default. Having no effect when width value is not set, or the number of characters in the actual value is greater than width value. &lt;br /&gt;
&lt;br /&gt;
[0] Zero before width means for values that zeros will be added until the minimum width is reached. If 0(zero) and -(hyphen) appear, the 0 is ignored &lt;br /&gt;
&lt;br /&gt;
[width] Positive decimal number specifying a minimum field size. If the number of characters in the actual value is less than width value - then the required number of space &amp;#039; &amp;#039; characters will be added before the value (or after it, if &amp;#039;-&amp;#039; field was set). No changes occurs if number of characters in the actual value is greater than the width value. &lt;br /&gt;
&lt;br /&gt;
[.precision] The point &amp;#039;.&amp;#039; with the following unsigned decimal number can specify either the precision of a floating-point image or the maximum number of characters to be printed from a string. &lt;br /&gt;
&lt;br /&gt;
[type] Specifies other format then the default for the given. For example, in the type field, you can give a specifier that says an integer will be formatted as an unsigned. The possible values are: &lt;br /&gt;
&lt;br /&gt;
:{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| f || Format real&amp;#039;s in fixed-decimal notation (such as 123.4 or 0.004321). This is the default for real&amp;#039;s.&lt;br /&gt;
|-&lt;br /&gt;
| e || Format real&amp;#039;s in exponential notation (such as 1.234e+002 or 4.321e-003).&lt;br /&gt;
|-&lt;br /&gt;
| g || Format real&amp;#039;s in the shortest of f and e format, but always in e format if exponent of the value is less than -4 or greater than or equal to the precision. Trailing zeros are truncated.&lt;br /&gt;
|-&lt;br /&gt;
| d or D || Format as a signed decimal number.&lt;br /&gt;
|-&lt;br /&gt;
| u or U || Format as an unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| x or X || Format as a hexadecimal number.&lt;br /&gt;
|-&lt;br /&gt;
| o or O || Format as an octal number.&lt;br /&gt;
|-&lt;br /&gt;
| c || Format as a char.&lt;br /&gt;
|-&lt;br /&gt;
| B || Format as the Visual Prolog binary type.&lt;br /&gt;
|-&lt;br /&gt;
| R || Format as a database reference number.&lt;br /&gt;
|-&lt;br /&gt;
| P || Format as a procedure parameter.&lt;br /&gt;
|-&lt;br /&gt;
| s || Format as a string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Integral Domains ====&lt;br /&gt;
&lt;br /&gt;
Integral domains are used for representing integral numbers. They are divided in two main categories for signed and unsigned numbers. Integral domains can also have different representation size. The predefined domains {{lang2|Built-in_entities|integer|integer}} and {{lang2|Built-in_entities|unsigned|unsigned}} represent signed and unsigned numbers with natural representation length for the processor architecture (i.e. 32bit on a 32bit machine, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be an integral domain and the resulting domain will be child-type (i.e. subtype) of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the size cannot be changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralSizeDescription&amp;gt; &amp;lt;IntegralRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;IntegralRangeDescription&amp;gt; &amp;lt;IntegralSizeDescription&amp;gt;-opt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;IntegralSizeDescription&amp;gt;:&lt;br /&gt;
    bitsize &amp;lt;DomainSize&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DomainSize&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral size description declares the size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; of the integral domain, measured in bits. The compiler implement such representation to the integral domain, which has no less than the specified number of bits. The value of &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; should be positive and no greater than the maximal value supported by the compiler.&lt;br /&gt;
&lt;br /&gt;
If integral size description is omitted, then it will become the same as the parent domain. If there is no parent domain, it will become the natural size for the processor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalBoundary&amp;gt;-opt .. &amp;lt;MaximalBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral range description declares the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits for the integral domain. If a limit is omitted, then the range of the parent domain is used. If there is no parent domain, then the &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; is used to determine respectively maximum or minimum value.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits should satisfy the limits implied by the specified bit size &amp;lt;vp&amp;gt;bitsize&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The domain bit size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; value and values of the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
==== Real Domains ====&lt;br /&gt;
&lt;br /&gt;
Real domains are used to represent numbers with fractional parts (i.e. floating point numbers). Real domains can be used to represent very large and very small numbers. The built-in domain &amp;#039;&amp;#039;real&amp;#039;&amp;#039; have the natural precision for the processor architecture (or the precision given by the compiler).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be a real domain and the resulting domain will be a subtype of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the precision cannot be increased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;: one of&lt;br /&gt;
    &amp;lt;RealPrecisionDescription&amp;gt; &amp;lt;RealRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;RealRangeDescription&amp;gt; &amp;lt;RealPrecisionDescription&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealPrecisionDescription&amp;gt;:&lt;br /&gt;
    digits &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The real precision description declares precision of the real domain, measured in number of decimal digits. If precision is omitted then it will become the same as for the parent domain. If there is no parent domain, then it will be the natural precision for the processor or given by the compiler (in Visual Prolog v.6 the compiler limit is 15 digits). Precision have an upper and a lower limits given by the compiler, if the precisions larger than that limit is used the numbers will only obtain the processor (compiler) specified precision anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalRealBoundary&amp;gt;-opt .. &amp;lt;MaximalRealBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalRealBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalRealBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to a floating point value. That is the real domain precision and limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
The real range description declares minimal and maximal limits for the real domain. If a limit is omitted then it will be the same as for the parent domain. If there is no parent domain then the largest possible range for the precision will be used.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generic Domains ====&lt;br /&gt;
&lt;br /&gt;
This section contains the formal syntax for generic domains, for a more complete introduction to generics please see the section &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; Generics&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeVariable&amp;gt;-comma-sep-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A formalTypeParameterList is a list of typeVariables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;:&lt;br /&gt;
    &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;&amp;lt;/vpbnf&amp;gt; is an upper case identifier. In a domain declaration the type variable must be bound in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;&amp;lt;/vpbnf&amp;gt; on the left hand side of the domain definition. In a predicate declaration all free type variables are implicitly bound and scoped to that predicate declaration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeName&amp;gt; {&amp;lt;TypeExpression&amp;gt;-comma-sep-list-opt }&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;&amp;lt;/vpbnf&amp;gt; is the application of a {{lang2|Domains|Type_Names|typeName}} to a list of types. The type name must be generic and the number of formal type parameters must match the number of type expressions.&lt;br /&gt;
&lt;br /&gt;
=== Universal and Root Types ===&lt;br /&gt;
&lt;br /&gt;
Visual Prolog uses some internal types, called &amp;#039;&amp;#039;root&amp;#039;&amp;#039; types and &amp;#039;&amp;#039;universal&amp;#039;&amp;#039; types.&lt;br /&gt;
&lt;br /&gt;
==== Universal Types ====&lt;br /&gt;
&lt;br /&gt;
A number literal like &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; does not have any particular type, it can be used as a value of any type that contains &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, including real types.&lt;br /&gt;
&lt;br /&gt;
We say that &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; have a universal type. Having a universal type means that it have any type, which can represent its value.&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations also return universal types.&lt;br /&gt;
&lt;br /&gt;
==== Root Types ====&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations are very liberal with their operand requirements:  You can add integers of any integer domain with each other.&lt;br /&gt;
&lt;br /&gt;
We say that arithmetic operands takes root types as arguments.  The integer root type is super-type of any integer type (regardless that it is not mentioned in their declarations).  Hence any integer type can be converted to the integer root type, and, since the arithmetic operations exist for the root types, it means one of them will work on any integer domains.&lt;br /&gt;
&lt;br /&gt;
The actual number of root types and which operands exist is a matter of library facilities, and outside the scope of this document to describe.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2906</id>
		<title>Language Reference/Domains</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2906"/>
		<updated>2012-12-19T08:01:57Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Calling Convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Domains}}&lt;br /&gt;
&lt;br /&gt;
=== Domains Sections ===&lt;br /&gt;
&lt;br /&gt;
A domain section defines a set of domains in the current scope (see {{lang|Interfaces|Interface}}, {{lang|Classes|Class Declaration}}, and {{lang|Implementations|Class Implementation}}).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainsSection&amp;gt;:&lt;br /&gt;
    domains &amp;lt;DomainDefinition&amp;gt;-dot-term-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Domain Definitions ===&lt;br /&gt;
&lt;br /&gt;
A domain definition defines a named domain in the current scope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain on the right hand side denotes an interface or a compound domain, then the defined domain is synonym (i.e. identical) to the type expression. Otherwise the defined domain becomes a subtype of the domain denoted by the type expression. Here a domain name &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
There are certain places where you must use a domain name rather than a type expression:&lt;br /&gt;
&lt;br /&gt;
*as a declaration of a formal argument type;&lt;br /&gt;
*as a type of a constant or a fact variable;&lt;br /&gt;
*as a type in a list domain.&lt;br /&gt;
&lt;br /&gt;
=== Type Expressions ===&lt;br /&gt;
&lt;br /&gt;
A type expression denotes a type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeExpression&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt;&lt;br /&gt;
    &amp;lt;CompoundDomain&amp;gt;&lt;br /&gt;
    &amp;lt;ListDomain&amp;gt;&lt;br /&gt;
    &amp;lt;PredicateDomain&amp;gt;&lt;br /&gt;
    &amp;lt;IntegralDomain&amp;gt;&lt;br /&gt;
    &amp;lt;RealDomain&amp;gt;&lt;br /&gt;
    &amp;lt;TypeVariable&amp;gt;&lt;br /&gt;
    &amp;lt;ScopeTypeVariable&amp;gt;&lt;br /&gt;
    &amp;lt;TypeApplication&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Type Names ====&lt;br /&gt;
&lt;br /&gt;
A type name is either an &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; name or the name of a &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039;. We use the term &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039; to specify domains whose elements are {{lang2|Basic_Concepts|Types|immutable}} (unchangeable). Here we can say that objects, belonging to domains correspondent to &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; names, have mutable state and terms of any other domains are immutable. So actually value types are everything except object types. A type name (obviously) denotes the type corresponding to the name of an existing domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeName&amp;gt;:&lt;br /&gt;
    &amp;lt;InterfaceName&amp;gt;&lt;br /&gt;
    &amp;lt;DomainName&amp;gt;&lt;br /&gt;
    &amp;lt;ClassQualifiedDomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassQualifiedDomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;ClassName&amp;gt;::&amp;lt;DomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;&amp;lt;/vpbnf&amp;gt; is an interface name, &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a value domain name, and &amp;lt;vpbnf&amp;gt;&amp;lt;ClassName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a class name.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    newDomain1 = existingDomain.&lt;br /&gt;
    newDomain2 = myInterface.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the domain name &amp;lt;vp&amp;gt;existingDomain&amp;lt;/vp&amp;gt; and the interface name &amp;lt;vp&amp;gt;myInterface&amp;lt;/vp&amp;gt; are used to define new domains.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Compound Domains ====&lt;br /&gt;
&lt;br /&gt;
Compound domains (also known as algebraic data types) are used to represent lists, trees, and other tree structured values. In its simple forms compound domains are used to represent structures and enumeration values. Compound domains can have a recursive definition. They can also be mutually/indirectly recursive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CompoundDomain&amp;gt;:&lt;br /&gt;
   &amp;lt;Alignment&amp;gt;-opt &amp;lt;FunctorAlternative&amp;gt;-semicolon-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Alignment&amp;gt;:&lt;br /&gt;
    align &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to an integral value.&lt;br /&gt;
&lt;br /&gt;
A compound domain declaration declares a list of functor alternatives with optional alignment. Alignment must be &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;2&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;4&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a compound domain consists of one functor alternative, then it is considered as structure and has representation, which is binary compatible with the appropriate structure in language C.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorAlternative&amp;gt;: &lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; &amp;lt;FunctorName&amp;gt; ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorName&amp;gt;&amp;lt;/vpbnf&amp;gt; is the name of a functor alternative it should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;ArgumentName&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any {{lang2|Lexical_Elements|Identifiers|upper case identifier}}. The compiler ignores it.&lt;br /&gt;
&lt;br /&gt;
Compound domains  have no subtype relations to any other domains.&lt;br /&gt;
&lt;br /&gt;
If a domain is defined as being equal to a compound domain, then these two domains are synonym types rather than subtypes. Meaning that they are just two different names for the same type.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    t1 = ff(); gg(integer, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the two-ary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes an {{lang2|Built-in_entities|integer|integer}} and a term of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; itself as arguments. So the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is recursively defined.&lt;br /&gt;
&lt;br /&gt;
The following expressions are terms of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff()&lt;br /&gt;
gg(77, ff())&lt;br /&gt;
gg(33, gg(44, gg(55, ff())))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = ff(); gg(t2). &lt;br /&gt;
    t2 = hh(t1, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the unary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes a term of the domain &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; as argument. &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is a compound domain with one alternative the functor &amp;lt;vp&amp;gt;hh&amp;lt;/vp&amp;gt;, which takes two &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; terms as argument. So the domains &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are mutually recursive.&lt;br /&gt;
&lt;br /&gt;
The following are terms in the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff() &lt;br /&gt;
gg(hh(ff(), ff())) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), ff())) &lt;br /&gt;
ggg(hh(ff(), g(hh(ff(), ff())))) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), gg(hh(ff(), ff()))))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&lt;br /&gt;
In this example &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are synonym types.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(); g(integer). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Normally, it is not necessary to use empty parenthesis after null-ary functors. But in a domain definition consisting only of a single null-ary functor, empty parenthesis are required to distinguish it from a synonym/subtype definition.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with a single null-ary functor, whereas &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is defined to be synonym to &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== List Domains ====&lt;br /&gt;
&lt;br /&gt;
List domains represent sequences of values of a certain domain. Thus, all elements in a &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; list must be of type &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListDomain&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt; *&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;T*&amp;lt;/vp&amp;gt; is the type of lists of &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
The following syntax is used for lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListExpression&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list-opt ]&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list | &amp;lt;Tail&amp;gt; ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Tail&amp;gt;:&lt;br /&gt;
    &amp;lt;Term&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Tail&amp;gt;&amp;lt;/vpbnf&amp;gt; is a term which should have a value of the &amp;lt;vpbnf&amp;gt;&amp;lt;ListDomain&amp;gt;&amp;lt;/vpbnf&amp;gt; type. Each &amp;lt;vpbnf&amp;gt;&amp;lt;Term&amp;gt;&amp;lt;/vpbnf&amp;gt; should be of {{lang2|Domains|Type_Names|typeName}} type.&lt;br /&gt;
&lt;br /&gt;
Actually, lists are just compound domains with two functors: &amp;lt;vp&amp;gt;[]&amp;lt;/vp&amp;gt; denoting the empty list and the mix-fix functor &amp;lt;vp&amp;gt;[HD|TL]&amp;lt;/vp&amp;gt; denoting the list with head &amp;lt;vp&amp;gt;HD&amp;lt;/vp&amp;gt; and tail &amp;lt;vp&amp;gt;TL&amp;lt;/vp&amp;gt;. The head must be of the underlying element type, whereas the tail must be a list of relevant type.&lt;br /&gt;
&lt;br /&gt;
Lists are however syntactically sugared.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En | L ]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | L ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1, E2, E3, ..., En |[}}&amp;lt;/vp&amp;gt;, which in turn is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | [] ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Predicate Domains ====&lt;br /&gt;
&lt;br /&gt;
Values of a predicate domain are predicates with the same &amp;quot;signature&amp;quot;, i.e. the same argument and return types, the same flow pattern and the same (or stronger) predicate mode.&lt;br /&gt;
&lt;br /&gt;
A predicate that returns a value is called a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, whereas a predicate that does not return a value is sometimes called an &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;ordinary&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; predicate, to stress that it is not a function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDomain&amp;gt;:&lt;br /&gt;
   ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt ) &amp;lt;ReturnArgument&amp;gt;-opt &lt;br /&gt;
   &amp;lt;PredicateModeAndFlow&amp;gt;-list-opt &amp;lt;CallingConvention&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
   &amp;lt;PredicateArgumentType&amp;gt; &amp;lt;VariableName&amp;gt;-opt&lt;br /&gt;
   &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ReturnArgument&amp;gt;:&lt;br /&gt;
    -&amp;gt; &amp;lt;FormalArgument&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateArgumentType&amp;gt;:&lt;br /&gt;
   &amp;lt;TypeName&amp;gt;&lt;br /&gt;
   &amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;VariableName&amp;gt;:&lt;br /&gt;
   &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;&amp;lt;/vpbnf&amp;gt; argument as the last &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;&amp;lt;/vpbnf&amp;gt; in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;-comma-sep-list&amp;lt;/vpbnf&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vpbnf&amp;gt; as a {{lang2|Domains|Type_Expressions|predicateArgumentType}} to specify that the argument can be of any type.&lt;br /&gt;
&lt;br /&gt;
Currently, predicate domains with ellipsis can only be used in predicate declarations.&lt;br /&gt;
&lt;br /&gt;
Predicate domains that are used in domain definitions can at most state one flow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateModeAndFlow&amp;gt;:&lt;br /&gt;
     &amp;lt;PredicateMode&amp;gt;-opt&lt;br /&gt;
     &amp;lt;FlowPattern&amp;gt;-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Predicate Mode =====&lt;br /&gt;
&lt;br /&gt;
The specified predicate mode applies for each member of a flow pattern list following it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateMode&amp;gt;: one of&lt;br /&gt;
   erroneous &lt;br /&gt;
   failure &lt;br /&gt;
   procedure &lt;br /&gt;
   determ &lt;br /&gt;
   multi &lt;br /&gt;
   nondeterm&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate modes can be described by the following sets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;erroneous = {} &lt;br /&gt;
failure = {Fail} &lt;br /&gt;
procedure = {Succeed} &lt;br /&gt;
determ = {Fail, Succeed} &lt;br /&gt;
multi = {Succeed, BacktrackPoint} &lt;br /&gt;
nondeterm = {Fail, Succeed, BacktrackPoint}&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;Fail&amp;#039;&amp;#039; is in the set it means that the predicate can fail. If &amp;#039;&amp;#039;succeed&amp;#039;&amp;#039; is in the set it means that the predicate can succeed. If &amp;#039;&amp;#039;BacktrackPoint&amp;#039;&amp;#039; is in the set it means that the predicate can return with an active backtrack point in it.&lt;br /&gt;
&lt;br /&gt;
If such a set, say &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;, is a subset of another set, say &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;, then we say that the mode is stronger than the other, i.e. &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt; is stronger than &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A predicate domain actually contain all predicates (with correct type and flow), which have the mode specified or a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;stronger&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; mode.&lt;br /&gt;
&lt;br /&gt;
It is illegal to state a predicate mode for constructors, they always have the &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; mode.&lt;br /&gt;
&lt;br /&gt;
Omitting of a predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Omitting of flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Notice that, in difference to Visual Prolog v. 5.x, inside implementations (i.e. for a local predicates) the needed flows and modes &amp;#039;&amp;#039;&amp;#039;are NOT derived from the usages of the predicate&amp;#039;&amp;#039;&amp;#039;. Now in declarations of for local predicates omitting the predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; and omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
If inside an implementation you do not want to specify all possible flows of a predicate usage explicitly, you still can deliver this duty to the compiler. For this task inside class implementations you can use the special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt;. In this case the compiler during the compilation will derive the needed flows from usages of the predicate. But if the optional preceding predicate mode is omitted before the &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; flow pattern, then the &amp;lt;vp&amp;gt;procedure mode&amp;lt;/vp&amp;gt; is always assumed.&lt;br /&gt;
&lt;br /&gt;
===== Flow Pattern =====&lt;br /&gt;
&lt;br /&gt;
The flow pattern defines the input/output direction of the arguments, which in combination with functor domains can be structures with parts of a single argument being input and other parts of the same argument being output.&lt;br /&gt;
&lt;br /&gt;
A flow pattern consists of a sequence of flows, each flow corresponds to an argument (fist flow to first argument, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FlowPattern&amp;gt;:&lt;br /&gt;
     ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt ) AnyFlow&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Flow&amp;gt;: one of&lt;br /&gt;
    i&lt;br /&gt;
    o &lt;br /&gt;
    &amp;lt;FunctorFlow&amp;gt;&lt;br /&gt;
    &amp;lt;ListFlow&amp;gt;&lt;br /&gt;
    &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ellipsis flow must match an ellipsis argument and can therefore be only the last flow in the flow pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;:&lt;br /&gt;
    ...&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;&amp;lt;/vpbnf&amp;gt; states a functor and flows of each of the components of that flow. The functor must of course be in the domain of the corresponding argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;:&lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow declaration cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
List flows are just like functor flows, but with the same syntactic sugaring as the list domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlow&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Flow&amp;gt;-comma-sep-list-opt &amp;lt;ListFlowTail&amp;gt;-opt]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlowTail&amp;gt;:&lt;br /&gt;
    | &amp;lt;Flow&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A list flow cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
When declaring a predicate the flow can be omitted. Inside an implementation (i.e. for a local predicate) the needed flows are derived from the usages of the predicate. Inside an interface or a class declaration (i.e. for a public predicate) omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; can be stated only in declarations of local predicates (i.e. in predicate declarations inside the implementation of a class). It means that the exact flow pattern will be evaluated during the compilation. If the optional preceding predicate mode is omitted for this flow pattern, then it assumes to be a &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp1 = (integer Argument1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; is a predicate domain. The predicates that have type &amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; takes one {{lang2|Built-in_entities|integer|integer}} argument. Since no flow-pattern is stated the argument is input, and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp2 = (integer Argument1) -&amp;gt; integer ReturnType.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicates of type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; take one {{lang2|Built-in_entities|integer|integer}} argument and returns a value of type {{lang2|Built-in_entities|integer|integer}}. Therefore, &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; is actually a function domain and the predicates that have type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; are actually functions. Since no flow-pattern is stated the argument is input and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    ppp : (integer Argument1, integer Argument2) determ (o,i) (i,o) nondeterm (o,o).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; takes two {{lang2|Built-in_entities|integer|integer}} arguments. It exists in three flow variants: &amp;lt;vp&amp;gt;(o,i)&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;(i,o)&amp;lt;/vp&amp;gt;, which are &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;(o,o)&amp;lt;/vp&amp;gt;, which is &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Calling Convention =====&lt;br /&gt;
&lt;br /&gt;
The calling convention determines how arguments, etc. are passed to the predicate, it also determines how the link name is derived from a predicate name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConvention&amp;gt;:&lt;br /&gt;
     language &amp;lt;CallingConventionKind&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConventionKind&amp;gt;: one of&lt;br /&gt;
     c thiscall stdcall apicall prolog&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a calling convention is not stated, then the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; convention is assumed. The &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention is the standard convention used for Prolog predicates.&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; follows the C/C++ standard calling convention. The link name of a predicate is created from the predicate name by adding a leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; follows the C++ standard calling convention for virtual functions. This calling convention uses the &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy but sometimes it may use the different argument and stack handling rules. Calling convention &amp;lt;vp&amp;gt;thiscall&amp;lt;/vp&amp;gt; can be applied to the object predicates only.&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; uses the &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy but it uses the different argument and stack handling rules. The following table shows the implementation of &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling convention:&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Feature&lt;br /&gt;
!Implementation&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing order&lt;br /&gt;
|Right to left.&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing convention&lt;br /&gt;
|By value, unless a compound domain term is passed. So it cannot be used to predicates with variable number of arguments.&lt;br /&gt;
|-&lt;br /&gt;
|Stack-maintenance responsibility&lt;br /&gt;
|Called predicate pops its own arguments from the stack.&lt;br /&gt;
|-&lt;br /&gt;
|Name-decoration convention&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|Case-translation convention&lt;br /&gt;
|No case translation of the predicate name is performed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the same argument and stack handling rules as &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, but for convenience to call MS Windows API functions &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the naming conventions that are used by most MS Windows API functions. According to &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; naming conventions the link name of a predicate is constructed as follows:&lt;br /&gt;
&lt;br /&gt;
*an leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name;&lt;br /&gt;
*the predicate name in which the first letter is changed in to a capital letter;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed, if the arguments and the return type indicate an ANSI, Unicode or neutral predicate, respectively;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt;&amp;#039; is suffixed;&lt;br /&gt;
*the number of bytes pushed on the call stack is suffixed.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     predicateName : (integer, string) language apicall&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument types of this predicate indicates that it is a Unicode predicate (as {{lang2|Built-in_entities|string|string}} is the domain of Unicode strings). An {{lang2|Built-in_entities|integer|integer}} and a {{lang2|Built-in_entities|string|string}} each occupies 4 bytes on the call stack and, therefore, the link name becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;_PredicateNameW@8&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; is used together with the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction the name stated in the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction is decorated in the same manner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; can only be used directly in a predicate declaration, not in a predicate domain definition. In predicate domain definitions &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, must be used instead. A predicate declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention cannot have clauses and it also cannot be resolved externally without explicit DLL name.&lt;br /&gt;
&lt;br /&gt;
The following table compares implementations of &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling conventions (the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention has the special implementation, which is not discussed here):&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Keyword&lt;br /&gt;
!Stack cleanup&lt;br /&gt;
!Predicate name case-translation&lt;br /&gt;
!Link predicate name decoration convention&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Calling&amp;#039;&amp;#039;&amp;#039; predicate pops the arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|The first letter of the predicate name is changed to the capital letter.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the name. The first letter is changed to the upper case. The &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed. The sign &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; is suffixed. The (decimal) number of bytes in the argument list is suffixed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Visual Prolog notion of predicate domains covers both class and object members. Class members are handled straight forward, but the handling of object members requires attention. The invocation of an object predicate will get &amp;quot;back&amp;quot; in the context of the object to which the member belongs.&lt;br /&gt;
&lt;br /&gt;
{{Example| Assume the following declarations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface actionEventSource&lt;br /&gt;
domains&lt;br /&gt;
     actionListener = (actionEventSource Source) procedure (i).&lt;br /&gt;
predicates&lt;br /&gt;
     addActionListener : (actionListener Listener) procedure (i).&lt;br /&gt;
     ... end interface&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also assume a class &amp;lt;vp&amp;gt;button_class&amp;lt;/vp&amp;gt; which supports the &amp;lt;vp&amp;gt;actionEventSource&amp;lt;/vp&amp;gt;. The event is sent when the button is pressed. In &amp;lt;vp&amp;gt;myDialog_class&amp;lt;/vp&amp;gt; class, which implements a dialog, I create a button and I want to listen to its action events, so that I can react on button presses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement myDialog_class &lt;br /&gt;
clauses&lt;br /&gt;
    new() :-&lt;br /&gt;
        OkButton = button_class::new(...),&lt;br /&gt;
        OkButton:addActionListener(onOk),&lt;br /&gt;
        ...&lt;br /&gt;
facts&lt;br /&gt;
    okPressed : () determ.&lt;br /&gt;
predicates&lt;br /&gt;
    onOk : actionListener.&lt;br /&gt;
clauses&lt;br /&gt;
    onOk(Source) :-&lt;br /&gt;
        assert(okPressed()).&lt;br /&gt;
end implement&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important thing about the example is that &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; is an object member and that, when the button is pressed, the invocation of the registered &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; will bring us back in the object that owns &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt;. This means that we have access to the object fact &amp;lt;vp&amp;gt;okPressed&amp;lt;/vp&amp;gt;, so that we can assert it.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Format Strings =====&lt;br /&gt;
&lt;br /&gt;
A formal parameter to a predicate can be marked as format string using the attribute {{lang2|Attributes|formatString|formatString}}. The format string can contain ordinary characters which are printed without modification, and format fields, that % begins with the percent &amp;#039;%&amp;#039; sign. If the percent sign is followed % by some unknown character (not the format specifier) - then % this character will  be printed without modifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     writef : (string Format [formatstring], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format fields specification is: &lt;br /&gt;
&lt;br /&gt;
[-][0][width][.precision][type] &lt;br /&gt;
&lt;br /&gt;
All fields are optional. &lt;br /&gt;
&lt;br /&gt;
[-] Hyphen indicates that the field is to be left justified; right justified is the default. Having no effect when width value is not set, or the number of characters in the actual value is greater than width value. &lt;br /&gt;
&lt;br /&gt;
[0] Zero before width means for values that zeros will be added until the minimum width is reached. If 0(zero) and -(hyphen) appear, the 0 is ignored &lt;br /&gt;
&lt;br /&gt;
[width] Positive decimal number specifying a minimum field size. If the number of characters in the actual value is less than width value - then the required number of space &amp;#039; &amp;#039; characters will be added before the value (or after it, if &amp;#039;-&amp;#039; field was set). No changes occurs if number of characters in the actual value is greater than the width value. &lt;br /&gt;
&lt;br /&gt;
[.precision] The point &amp;#039;.&amp;#039; with the following unsigned decimal number can specify either the precision of a floating-point image or the maximum number of characters to be printed from a string. &lt;br /&gt;
&lt;br /&gt;
[type] Specifies other format then the default for the given. For example, in the type field, you can give a specifier that says an integer will be formatted as an unsigned. The possible values are: &lt;br /&gt;
&lt;br /&gt;
:{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| f || Format real&amp;#039;s in fixed-decimal notation (such as 123.4 or 0.004321). This is the default for real&amp;#039;s.&lt;br /&gt;
|-&lt;br /&gt;
| e || Format real&amp;#039;s in exponential notation (such as 1.234e+002 or 4.321e-003).&lt;br /&gt;
|-&lt;br /&gt;
| g || Format real&amp;#039;s in the shortest of f and e format, but always in e format if exponent of the value is less than -4 or greater than or equal to the precision. Trailing zeros are truncated.&lt;br /&gt;
|-&lt;br /&gt;
| d or D || Format as a signed decimal number.&lt;br /&gt;
|-&lt;br /&gt;
| u or U || Format as an unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| x or X || Format as a hexadecimal number.&lt;br /&gt;
|-&lt;br /&gt;
| o or O || Format as an octal number.&lt;br /&gt;
|-&lt;br /&gt;
| c || Format as a char.&lt;br /&gt;
|-&lt;br /&gt;
| B || Format as the Visual Prolog binary type.&lt;br /&gt;
|-&lt;br /&gt;
| R || Format as a database reference number.&lt;br /&gt;
|-&lt;br /&gt;
| P || Format as a procedure parameter.&lt;br /&gt;
|-&lt;br /&gt;
| s || Format as a string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Integral Domains ====&lt;br /&gt;
&lt;br /&gt;
Integral domains are used for representing integral numbers. They are divided in two main categories for signed and unsigned numbers. Integral domains can also have different representation size. The predefined domains {{lang2|Built-in_entities|integer|integer}} and {{lang2|Built-in_entities|unsigned|unsigned}} represent signed and unsigned numbers with natural representation length for the processor architecture (i.e. 32bit on a 32bit machine, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be an integral domain and the resulting domain will be child-type (i.e. subtype) of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the size cannot be changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralSizeDescription&amp;gt; &amp;lt;IntegralRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;IntegralRangeDescription&amp;gt; &amp;lt;IntegralSizeDescription&amp;gt;-opt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;IntegralSizeDescription&amp;gt;:&lt;br /&gt;
    bitsize &amp;lt;DomainSize&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DomainSize&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral size description declares the size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; of the integral domain, measured in bits. The compiler implement such representation to the integral domain, which has no less than the specified number of bits. The value of &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; should be positive and no greater than the maximal value supported by the compiler.&lt;br /&gt;
&lt;br /&gt;
If integral size description is omitted, then it will become the same as the parent domain. If there is no parent domain, it will become the natural size for the processor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalBoundary&amp;gt;-opt .. &amp;lt;MaximalBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral range description declares the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits for the integral domain. If a limit is omitted, then the range of the parent domain is used. If there is no parent domain, then the &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; is used to determine respectively maximum or minimum value.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits should satisfy the limits implied by the specified bit size &amp;lt;vp&amp;gt;bitsize&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The domain bit size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; value and values of the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
==== Real Domains ====&lt;br /&gt;
&lt;br /&gt;
Real domains are used to represent numbers with fractional parts (i.e. floating point numbers). Real domains can be used to represent very large and very small numbers. The built-in domain &amp;#039;&amp;#039;real&amp;#039;&amp;#039; have the natural precision for the processor architecture (or the precision given by the compiler).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be a real domain and the resulting domain will be a subtype of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the precision cannot be increased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;: one of&lt;br /&gt;
    &amp;lt;RealPrecisionDescription&amp;gt; &amp;lt;RealRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;RealRangeDescription&amp;gt; &amp;lt;RealPrecisionDescription&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealPrecisionDescription&amp;gt;:&lt;br /&gt;
    digits &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The real precision description declares precision of the real domain, measured in number of decimal digits. If precision is omitted then it will become the same as for the parent domain. If there is no parent domain, then it will be the natural precision for the processor or given by the compiler (in Visual Prolog v.6 the compiler limit is 15 digits). Precision have an upper and a lower limits given by the compiler, if the precisions larger than that limit is used the numbers will only obtain the processor (compiler) specified precision anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalRealBoundary&amp;gt;-opt .. &amp;lt;MaximalRealBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalRealBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalRealBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to a floating point value. That is the real domain precision and limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
The real range description declares minimal and maximal limits for the real domain. If a limit is omitted then it will be the same as for the parent domain. If there is no parent domain then the largest possible range for the precision will be used.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generic Domains ====&lt;br /&gt;
&lt;br /&gt;
This section contains the formal syntax for generic domains, for a more complete introduction to generics please see the section &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; Generics&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeVariable&amp;gt;-comma-sep-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A formalTypeParameterList is a list of typeVariables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;:&lt;br /&gt;
    &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;&amp;lt;/vpbnf&amp;gt; is an upper case identifier. In a domain declaration the type variable must be bound in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;&amp;lt;/vpbnf&amp;gt; on the left hand side of the domain definition. In a predicate declaration all free type variables are implicitly bound and scoped to that predicate declaration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeName&amp;gt; {&amp;lt;TypeExpression&amp;gt;-comma-sep-list-opt }&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;&amp;lt;/vpbnf&amp;gt; is the application of a {{lang2|Domains|Type_Names|typeName}} to a list of types. The type name must be generic and the number of formal type parameters must match the number of type expressions.&lt;br /&gt;
&lt;br /&gt;
=== Universal and Root Types ===&lt;br /&gt;
&lt;br /&gt;
Visual Prolog uses some internal types, called &amp;#039;&amp;#039;root&amp;#039;&amp;#039; types and &amp;#039;&amp;#039;universal&amp;#039;&amp;#039; types.&lt;br /&gt;
&lt;br /&gt;
==== Universal Types ====&lt;br /&gt;
&lt;br /&gt;
A number literal like &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; does not have any particular type, it can be used as a value of any type that contains &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, including real types.&lt;br /&gt;
&lt;br /&gt;
We say that &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; have a universal type. Having a universal type means that it have any type, which can represent its value.&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations also return universal types.&lt;br /&gt;
&lt;br /&gt;
==== Root Types ====&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations are very liberal with their operand requirements:  You can add integers of any integer domain with each other.&lt;br /&gt;
&lt;br /&gt;
We say that arithmetic operands takes root types as arguments.  The integer root type is super-type of any integer type (regardless that it is not mentioned in their declarations).  Hence any integer type can be converted to the integer root type, and, since the arithmetic operations exist for the root types, it means one of them will work on any integer domains.&lt;br /&gt;
&lt;br /&gt;
The actual number of root types and which operands exist is a matter of library facilities, and outside the scope of this document to describe.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2773</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2773"/>
		<updated>2012-10-25T09:17:20Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* programPoint */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument. Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== programPoint ====&lt;br /&gt;
&lt;br /&gt;
Used for a predicate or constructor declaration to indicate that it recieves an extra input argument which describes the place in a program (program point) where this predicate was called. This additional argument has programPoint type which is declared in the PFC core class like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    programPoint = programPoint(hScopeDescriptor ClassDescriptor, string PredicateName, sourceCursor Cursor).&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The clause name of such predicate or constructor should have suffix &amp;quot;_explicit&amp;quot;. Valid for a predicate or constructor declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string String) [programPoint].&lt;br /&gt;
clauses&lt;br /&gt;
    pred_explicit(ProgramPoint, String) :-&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the objects of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2772</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2772"/>
		<updated>2012-10-25T09:16:51Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* programPoint */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument. Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== programPoint ====&lt;br /&gt;
&lt;br /&gt;
Used for a predicate or constructor declaration to indicate that it recieves an extra input argument which describes the place in a program (program point) where this predicate was called. This additional argument has programPoint type which is declared in the PFC core class like:&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    programPoint = programPoint(hScopeDescriptor ClassDescriptor, string PredicateName, sourceCursor Cursor).&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The clause name of such predicate or constructor should have suffix &amp;quot;_explicit&amp;quot;. Valid for a predicate or constructor declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string String) [programPoint].&lt;br /&gt;
clauses&lt;br /&gt;
    pred_explicit(ProgramPoint, String) :-&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the objects of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2771</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2771"/>
		<updated>2012-10-25T09:03:58Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* programPoint */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument. Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== programPoint ====&lt;br /&gt;
&lt;br /&gt;
Used for a predicate or constructor declaration to indicate that it recieves an extra input argument which describes the place in a program (program point) where this predicate was called. Valid for a predicate or constructor declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string String) [programPoint].&lt;br /&gt;
clauses&lt;br /&gt;
    pred_explicit(ProgramPoint, String) :-&lt;br /&gt;
        ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the objects of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2770</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2770"/>
		<updated>2012-10-25T08:57:49Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* out */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument. Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== programPoint ====&lt;br /&gt;
&lt;br /&gt;
Valid for a predicate or constructor declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string String) [programPoint].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the objects of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2769</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2769"/>
		<updated>2012-10-25T08:55:03Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* sealed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the objects of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2768</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2768"/>
		<updated>2012-10-25T08:53:49Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* sealed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. This allows to create more efficient codes, because the compiler provides some optimization when using the object of such type. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&lt;br /&gt;
&lt;br /&gt;
class myClass : myInterface&lt;br /&gt;
...&lt;br /&gt;
end class myClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2767</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2767"/>
		<updated>2012-10-25T08:41:41Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* retired */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any public constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== sealed ====&lt;br /&gt;
&lt;br /&gt;
Used for an interface to indicate that it cannot be supported by any other interface. Valid for an object creating class declaration as a construction interface.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface myInterface&lt;br /&gt;
    [sealed]&lt;br /&gt;
...&lt;br /&gt;
end interface myInterface&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2727</id>
		<title>Language Reference/Directives</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2727"/>
		<updated>2012-06-09T09:06:08Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Binary File Inclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Directives}}&lt;br /&gt;
&lt;br /&gt;
Each compiler directive starts from the &amp;lt;vp&amp;gt;#&amp;lt;/vp&amp;gt; character. The following directives are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#bininclude &amp;lt;/vp&amp;gt; - file inclusion.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; - conditional statements.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; - exporting and importing classes.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; - compilation time information.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; - compiler options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Source File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive is used to include the contents of another file into your program source code during compilation. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_include&amp;gt; :&lt;br /&gt;
   #include &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include &amp;quot;pfc\\exception\\exception.ph&amp;quot;     % Includes pfc\exception\exception.ph file&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include @&amp;quot;pfc\vpi\vpimessage\vpimessage.ph&amp;quot;     % Includes pfc\vpi\vpimessage\vpimessage.ph&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiler directive uses &amp;quot;include the first file occurrence only&amp;quot; semantics. That is, if a compilation unit contains several include directives for the same file, it will be included only one time with the first include directive.&lt;br /&gt;
&lt;br /&gt;
Each included file must contain several accomplished scopes; an included file cannot contain uncompleted scopes. That is, it should contain several accomplished interface declarations, class declarations, class implementations or/and several compiler directives.&lt;br /&gt;
&lt;br /&gt;
The compiler tries to find the specified include source file in the following way:&lt;br /&gt;
&lt;br /&gt;
#If the filename contains an absolute path, then this file should be included.&lt;br /&gt;
#Otherwise, the compiler searches for the specified include filename among the paths that had been defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option. These paths are handled consequently as they are specified in the option. In the IDE you can set these paths in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;Directories&amp;#039;&amp;#039;&amp;#039; tab of the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog.&lt;br /&gt;
&lt;br /&gt;
If the compiler does not find the specified file a compiling time error is generated.&lt;br /&gt;
&lt;br /&gt;
=== Binary File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive is used to include (during compilation) the contents of a file (specified by the {{lang2|Lexical_Elements|String_Literals|string_literal}} string) as a ::{{lang2|Built-in_entities|binary|binary}} type constant into your program source code. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_bininclude&amp;gt; :&lt;br /&gt;
   #bininclude ( &amp;lt;String_literal&amp;gt; )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This directive can be used in any places where {{lang2|Built-in_entities|binary|binary}} constants are allowed. The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename. The syntax is the same as in the &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive described in the previous paragraph {{lang2|Directives|Source_File_Inclusion|Source File Inclusions}}. The compiler tries to find the specified file in the same way as for &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive.&lt;br /&gt;
&lt;br /&gt;
The typical usage is like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
    myBin : binary = #bininclude(&amp;quot;Bin.bin&amp;quot;).&lt;br /&gt;
    % Creates value of binary constant from &amp;quot;Bin.bin&amp;quot; file&amp;lt;/vip&amp;gt;&lt;br /&gt;
When creating a binary constant the compiler adds the EOS symbol immediately after this constant, which makes safe the directive usages like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
    text : string = uncheckedConvert(string, #bininclude(&amp;quot;text.txt&amp;quot;)).&lt;br /&gt;
    % Here text.txt is a text file, which is normally not text zero terminated&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exporting and Importing Classes ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; are used to determine lists of exported and imported classes, respectively. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #export &amp;lt;ClassNames&amp;gt;-comma-sep-list&lt;br /&gt;
&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #externally &amp;lt;ClassNames&amp;gt;-comma-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These compiler directives are applied only to classes {{lang|Classes|classNames}}, which do not construct objects.&lt;br /&gt;
&lt;br /&gt;
They can be used only outside scopes; that is, they cannot be used inside declarations of interfaces and classes and they cannot be used inside implementations of classes.&lt;br /&gt;
&lt;br /&gt;
By default, predicates within one executed module are hidden at runtime for all other executed modules. An &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive makes names of specified classes public outside the module in which they are declared (and implemented). Therefore, all predicates from this module declared in the classes (specified in an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive) become accessible while runtime from other executed modules.&lt;br /&gt;
&lt;br /&gt;
Usually, an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used in projects, which target modules are DLLs. It enumerates classes declared in a DLL, which should be accessible to other modules that use this DLL.&lt;br /&gt;
&lt;br /&gt;
If a compilation unit export some class, then this compilation unit should contain this class implementation.&lt;br /&gt;
&lt;br /&gt;
Also an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used to specify {{lang2|Directives|Conditional_Compilation|condition}} expressions for &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directives.&lt;br /&gt;
&lt;br /&gt;
For example, let us suppose that somewhere in the beginning of a compilation unit the compiler has met the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler, if in the subsequent code it meets an &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive with the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive used as the condition expression, for example like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then  ...  #endif   &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler evaluates the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; and, hence, the compiler executes the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the conditional compilation directive.&lt;br /&gt;
&lt;br /&gt;
For example, the following &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive with the subsequent &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&lt;br /&gt;
...&lt;br /&gt;
#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
guaranty that the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package will be included into the compilation unit.&lt;br /&gt;
&lt;br /&gt;
From the other hand, if an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive is not met by the compiler (somewhere in the compilation unit before the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive, which uses the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive as the conditional expression), then the compiler evaluates this &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt;. Hence, the compiler will not execute the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation directive. That is, the single &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive without previous &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does not requires to include the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive is counterpart to an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive can be used instead of (and concurrently with) an &amp;lt;vp&amp;gt;IMPORTS&amp;lt;/vp&amp;gt; directive in definition files. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive enumerates classes, which are declared in a module but implemented in other modules. Therefore, the compiler will not produce errors when it detects such classes. The referenced classes can be implemented (and exported) in DLLs, which can be linked to the module at runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directives can be used as &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; boolean expressions in {{lang2|Directives|Compiler_Directives|Conditional Directives}}.&lt;br /&gt;
&lt;br /&gt;
For example, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #include &amp;quot;Some package.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Information ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used to issue user-defined messages into a listing file while compilation of project modules and to interrupt compilation.&lt;br /&gt;
&lt;br /&gt;
These directives can be used either outside scopes (interface declaration, class declaration or class implementation), or inside scopes but outside sections. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_message&amp;gt;: one of&lt;br /&gt;
    #message &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #error &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #requires &amp;lt;String_literal&amp;gt; &amp;lt;Pp_dir_orrequires&amp;gt;-list-opt&lt;br /&gt;
    #orrequires &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the compiler meets any of these directives, it generates the correspondent warning message and place the directive text into a &amp;#039;&amp;#039;listing file&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A listing file name can be specified with the compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listingfile:&amp;quot;FileName&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that no empty spaces can be used between the colon &amp;lt;vp&amp;gt;:&amp;lt;/vp&amp;gt; (after &amp;lt;vp&amp;gt;/listinglile&amp;lt;/vp&amp;gt;) and &amp;lt;vp&amp;gt;&amp;quot;FileName&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default the compiler does NOT generate informative messages for the &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives. You can switch generation of these informative messages ON specifying the compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listing:message&lt;br /&gt;
/listing:requires&lt;br /&gt;
/listing:ALL&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| In this case, when the compiler meets a directive like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some message&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will place the following text into the listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : information c062: #message &amp;quot;Some message&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; (&amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;) issues arbitrary user-defined messages about the needed source (object) files into a listing file. The &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directive cannot be used alone: the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directive should immediately (separated with white spaces or comments only) precede it.&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; always terminates the compilation and issues the user-defined error message like the following into a listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : error c080: #error &amp;quot;Compilation is interrupted&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can parse and analyze these messages and accept the required actions. For example, the VDE analyzes information printed by the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives and automatically adds all needed PFC packages and standard libraries to the compiled project (See also the &amp;#039;&amp;#039;&amp;#039;Handling Project Modules&amp;#039;&amp;#039;&amp;#039; topic).&lt;br /&gt;
&lt;br /&gt;
{{Example| The directives &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#requires @&amp;quot;\Common\Sources\CommonTypes.pack&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Lib\CommonTypes.lib&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Obj\Foreign.obj&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #requires @&amp;quot;\Sources\Debug\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Debug\Tools.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #requires @&amp;quot;\Sources\Release\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Release\Tools.lib&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
#orrequires &amp;quot;SomeLibrary.lib&amp;quot;&lt;br /&gt;
#requires &amp;quot;SomePackage.pack&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #orrequires @&amp;quot;\Debug\SomePackage.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #orrequires @&amp;quot;\Release\SomePackage.lib&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt; directive can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some text&amp;quot;&lt;br /&gt;
#if someClass::someConstant &amp;gt; 0 #then&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;gt; 0&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;lt;= 0&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
class someClass&lt;br /&gt;
   #if ::compiler_version &amp;gt; 600 #then&lt;br /&gt;
       #message  &amp;quot;New compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 1.&lt;br /&gt;
   #else&lt;br /&gt;
       #message &amp;quot;Old compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 0.&lt;br /&gt;
   #endif&lt;br /&gt;
end class someClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #error &amp;quot;Debug version is not yet implemented&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Compiler options directive ===&lt;br /&gt;
&lt;br /&gt;
Compiler directive &amp;lt;vp&amp;gt;#options &amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; affects the whole compilation unit. This directive should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates a warning message and ignores the directive.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;&amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; can only contain the following compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&amp;quot;/Warning&amp;quot;&lt;br /&gt;
&amp;quot;/Check&amp;quot;&lt;br /&gt;
&amp;quot;/NOCheck&amp;quot;&lt;br /&gt;
&amp;quot;/Optimize&amp;quot;&lt;br /&gt;
&amp;quot;/DEBug&amp;quot;&lt;br /&gt;
&amp;quot;/GOAL&amp;quot;&lt;br /&gt;
&amp;quot;/MAXErrors&amp;quot;&lt;br /&gt;
&amp;quot;/MAXWarnings&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise the compiler generates the error message for invalid option.&lt;br /&gt;
If there are several &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; directives they are handled in the textual order.&lt;br /&gt;
&lt;br /&gt;
=== Conditional Compilation ===&lt;br /&gt;
&lt;br /&gt;
The conditional programming constructions are part of the Visual Prolog language. Only other compiler directives, {{lang2|Compilation_Units|Compilation_Units_and_Items|Compilation Units}}, and {{lang2|Program_Sections|Program_Sections|program sections}} (including empty) can be conditional. The following syntax is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConditionalItem&amp;gt; :&lt;br /&gt;
   #if &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;-list-opt &amp;lt;ElseIfItem&amp;gt;-list-opt &amp;lt;ElseItem&amp;gt;-opt #endif&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseIfItem&amp;gt; :&lt;br /&gt;
   #elseif &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseItem&amp;gt; :&lt;br /&gt;
   #else &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any expression, which can be evaluated to fail or succeed during compilation time.&lt;br /&gt;
&lt;br /&gt;
Each one conditional compilation statement must be in one file, that is, the compiler directives &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt; (if present), &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; of the same level of nesting must be in one file.&lt;br /&gt;
&lt;br /&gt;
During compilation the compiler evaluates the conditions, in order to determine which parts to include in the final program. Parts that are excluded from the final program are called the dead branches.&lt;br /&gt;
&lt;br /&gt;
All branches of conditional compilation items are syntax checked and must be syntactically correct. That is, also the dead branches must be syntactically correct.&lt;br /&gt;
&lt;br /&gt;
The compiler only calculates conditions on a need to know basis, i.e. it does not calculate conditions in dead branches.&lt;br /&gt;
&lt;br /&gt;
A condition may not depend on any code, which is located textually inside the conditional statement.&lt;br /&gt;
&lt;br /&gt;
The example below is &amp;#039;&amp;#039;&amp;#039;illegal&amp;#039;&amp;#039;&amp;#039; because the condition depends on the scope (and constant) which is declared inside the condition branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if aaa::x &amp;gt; 7 #then % ERROR!&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 3&lt;br /&gt;
end class aaa&lt;br /&gt;
#else&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 23&lt;br /&gt;
end class aaa&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2725</id>
		<title>Language Reference/Directives</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2725"/>
		<updated>2012-06-09T06:58:42Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Binary File Inclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Directives}}&lt;br /&gt;
&lt;br /&gt;
Each compiler directive starts from the &amp;lt;vp&amp;gt;#&amp;lt;/vp&amp;gt; character. The following directives are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#bininclude &amp;lt;/vp&amp;gt; - file inclusion.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; - conditional statements.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; - exporting and importing classes.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; - compilation time information.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; - compiler options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Source File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive is used to include the contents of another file into your program source code during compilation. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_include&amp;gt; :&lt;br /&gt;
   #include &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include &amp;quot;pfc\\exception\\exception.ph&amp;quot;     % Includes pfc\exception\exception.ph file&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include @&amp;quot;pfc\vpi\vpimessage\vpimessage.ph&amp;quot;     % Includes pfc\vpi\vpimessage\vpimessage.ph&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiler directive uses &amp;quot;include the first file occurrence only&amp;quot; semantics. That is, if a compilation unit contains several include directives for the same file, it will be included only one time with the first include directive.&lt;br /&gt;
&lt;br /&gt;
Each included file must contain several accomplished scopes; an included file cannot contain uncompleted scopes. That is, it should contain several accomplished interface declarations, class declarations, class implementations or/and several compiler directives.&lt;br /&gt;
&lt;br /&gt;
The compiler tries to find the specified include source file in the following way:&lt;br /&gt;
&lt;br /&gt;
#If the filename contains an absolute path, then this file should be included.&lt;br /&gt;
#Otherwise, the compiler searches for the specified include filename among the paths that had been defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option. These paths are handled consequently as they are specified in the option. In the IDE you can set these paths in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;Directories&amp;#039;&amp;#039;&amp;#039; tab of the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog.&lt;br /&gt;
&lt;br /&gt;
If the compiler does not find the specified file a compiling time error is generated.&lt;br /&gt;
&lt;br /&gt;
=== Binary File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive is used to include (during compilation) the contents of a file (specified by the {{lang2|Lexical_Elements|String_Literals|string_literal}} string) as a ::{{lang2|Built-in_entities|binary|binary}} type constant into your program source code. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_bininclude&amp;gt; :&lt;br /&gt;
   #bininclude ( &amp;lt;String_literal&amp;gt; )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This directive can be used in any places where ::{{lang2|Built-in_entities|binary|binary}} constants are allowed. The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename. The syntax is the same as in the &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive described in the previous paragraph {{lang2|Directives|Source_File_Inclusion|Source File Inclusions}}. The compiler tries to find the specified file in the same way as for &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive.&lt;br /&gt;
&lt;br /&gt;
When creating a binary constant the compiler adds the EOS symbol immediately after this constant, which makes safe the directive usages like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
 text :  ::string = uncheckedConvert(string, #bininclude (&amp;quot;text.txt&amp;quot;)). % Here text.txt is a text file, which&lt;br /&gt;
                                                           % is normally not text zero terminated&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The typical usage is like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
 myBin :  ::binary = #bininclude (&amp;quot;Bin.bin&amp;quot;). % Creates value of binary&lt;br /&gt;
                                                            % constant from &amp;quot;Bin.bin&amp;quot; file&lt;br /&gt;
 myBin2  = #bininclude (&amp;quot;Bin2.bin&amp;quot;).            % Short format of a binary&lt;br /&gt;
                                                             % constant initialization&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exporting and Importing Classes ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; are used to determine lists of exported and imported classes, respectively. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #export &amp;lt;ClassNames&amp;gt;-comma-sep-list&lt;br /&gt;
&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #externally &amp;lt;ClassNames&amp;gt;-comma-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These compiler directives are applied only to classes {{lang|Classes|classNames}}, which do not construct objects.&lt;br /&gt;
&lt;br /&gt;
They can be used only outside scopes; that is, they cannot be used inside declarations of interfaces and classes and they cannot be used inside implementations of classes.&lt;br /&gt;
&lt;br /&gt;
By default, predicates within one executed module are hidden at runtime for all other executed modules. An &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive makes names of specified classes public outside the module in which they are declared (and implemented). Therefore, all predicates from this module declared in the classes (specified in an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive) become accessible while runtime from other executed modules.&lt;br /&gt;
&lt;br /&gt;
Usually, an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used in projects, which target modules are DLLs. It enumerates classes declared in a DLL, which should be accessible to other modules that use this DLL.&lt;br /&gt;
&lt;br /&gt;
If a compilation unit export some class, then this compilation unit should contain this class implementation.&lt;br /&gt;
&lt;br /&gt;
Also an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used to specify {{lang2|Directives|Conditional_Compilation|condition}} expressions for &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directives.&lt;br /&gt;
&lt;br /&gt;
For example, let us suppose that somewhere in the beginning of a compilation unit the compiler has met the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler, if in the subsequent code it meets an &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive with the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive used as the condition expression, for example like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then  ...  #endif   &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler evaluates the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; and, hence, the compiler executes the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the conditional compilation directive.&lt;br /&gt;
&lt;br /&gt;
For example, the following &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive with the subsequent &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&lt;br /&gt;
...&lt;br /&gt;
#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
guaranty that the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package will be included into the compilation unit.&lt;br /&gt;
&lt;br /&gt;
From the other hand, if an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive is not met by the compiler (somewhere in the compilation unit before the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive, which uses the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive as the conditional expression), then the compiler evaluates this &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt;. Hence, the compiler will not execute the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation directive. That is, the single &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive without previous &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does not requires to include the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive is counterpart to an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive can be used instead of (and concurrently with) an &amp;lt;vp&amp;gt;IMPORTS&amp;lt;/vp&amp;gt; directive in definition files. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive enumerates classes, which are declared in a module but implemented in other modules. Therefore, the compiler will not produce errors when it detects such classes. The referenced classes can be implemented (and exported) in DLLs, which can be linked to the module at runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directives can be used as &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; boolean expressions in {{lang2|Directives|Compiler_Directives|Conditional Directives}}.&lt;br /&gt;
&lt;br /&gt;
For example, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #include &amp;quot;Some package.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Information ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used to issue user-defined messages into a listing file while compilation of project modules and to interrupt compilation.&lt;br /&gt;
&lt;br /&gt;
These directives can be used either outside scopes (interface declaration, class declaration or class implementation), or inside scopes but outside sections. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_message&amp;gt;: one of&lt;br /&gt;
    #message &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #error &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #requires &amp;lt;String_literal&amp;gt; &amp;lt;Pp_dir_orrequires&amp;gt;-list-opt&lt;br /&gt;
    #orrequires &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the compiler meets any of these directives, it generates the correspondent warning message and place the directive text into a &amp;#039;&amp;#039;listing file&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A listing file name can be specified with the compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listingfile:&amp;quot;FileName&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that no empty spaces can be used between the colon &amp;lt;vp&amp;gt;:&amp;lt;/vp&amp;gt; (after &amp;lt;vp&amp;gt;/listinglile&amp;lt;/vp&amp;gt;) and &amp;lt;vp&amp;gt;&amp;quot;FileName&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default the compiler does NOT generate informative messages for the &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives. You can switch generation of these informative messages ON specifying the compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listing:message&lt;br /&gt;
/listing:requires&lt;br /&gt;
/listing:ALL&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| In this case, when the compiler meets a directive like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some message&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will place the following text into the listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : information c062: #message &amp;quot;Some message&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; (&amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;) issues arbitrary user-defined messages about the needed source (object) files into a listing file. The &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directive cannot be used alone: the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directive should immediately (separated with white spaces or comments only) precede it.&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; always terminates the compilation and issues the user-defined error message like the following into a listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : error c080: #error &amp;quot;Compilation is interrupted&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can parse and analyze these messages and accept the required actions. For example, the VDE analyzes information printed by the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives and automatically adds all needed PFC packages and standard libraries to the compiled project (See also the &amp;#039;&amp;#039;&amp;#039;Handling Project Modules&amp;#039;&amp;#039;&amp;#039; topic).&lt;br /&gt;
&lt;br /&gt;
{{Example| The directives &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#requires @&amp;quot;\Common\Sources\CommonTypes.pack&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Lib\CommonTypes.lib&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Obj\Foreign.obj&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #requires @&amp;quot;\Sources\Debug\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Debug\Tools.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #requires @&amp;quot;\Sources\Release\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Release\Tools.lib&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
#orrequires &amp;quot;SomeLibrary.lib&amp;quot;&lt;br /&gt;
#requires &amp;quot;SomePackage.pack&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #orrequires @&amp;quot;\Debug\SomePackage.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #orrequires @&amp;quot;\Release\SomePackage.lib&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt; directive can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some text&amp;quot;&lt;br /&gt;
#if someClass::someConstant &amp;gt; 0 #then&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;gt; 0&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;lt;= 0&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
class someClass&lt;br /&gt;
   #if ::compiler_version &amp;gt; 600 #then&lt;br /&gt;
       #message  &amp;quot;New compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 1.&lt;br /&gt;
   #else&lt;br /&gt;
       #message &amp;quot;Old compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 0.&lt;br /&gt;
   #endif&lt;br /&gt;
end class someClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #error &amp;quot;Debug version is not yet implemented&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Compiler options directive ===&lt;br /&gt;
&lt;br /&gt;
Compiler directive &amp;lt;vp&amp;gt;#options &amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; affects the whole compilation unit. This directive should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates a warning message and ignores the directive.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;&amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; can only contain the following compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&amp;quot;/Warning&amp;quot;&lt;br /&gt;
&amp;quot;/Check&amp;quot;&lt;br /&gt;
&amp;quot;/NOCheck&amp;quot;&lt;br /&gt;
&amp;quot;/Optimize&amp;quot;&lt;br /&gt;
&amp;quot;/DEBug&amp;quot;&lt;br /&gt;
&amp;quot;/GOAL&amp;quot;&lt;br /&gt;
&amp;quot;/MAXErrors&amp;quot;&lt;br /&gt;
&amp;quot;/MAXWarnings&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise the compiler generates the error message for invalid option.&lt;br /&gt;
If there are several &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; directives they are handled in the textual order.&lt;br /&gt;
&lt;br /&gt;
=== Conditional Compilation ===&lt;br /&gt;
&lt;br /&gt;
The conditional programming constructions are part of the Visual Prolog language. Only other compiler directives, {{lang2|Compilation_Units|Compilation_Units_and_Items|Compilation Units}}, and {{lang2|Program_Sections|Program_Sections|program sections}} (including empty) can be conditional. The following syntax is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConditionalItem&amp;gt; :&lt;br /&gt;
   #if &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;-list-opt &amp;lt;ElseIfItem&amp;gt;-list-opt &amp;lt;ElseItem&amp;gt;-opt #endif&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseIfItem&amp;gt; :&lt;br /&gt;
   #elseif &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseItem&amp;gt; :&lt;br /&gt;
   #else &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any expression, which can be evaluated to fail or succeed during compilation time.&lt;br /&gt;
&lt;br /&gt;
Each one conditional compilation statement must be in one file, that is, the compiler directives &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt; (if present), &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; of the same level of nesting must be in one file.&lt;br /&gt;
&lt;br /&gt;
During compilation the compiler evaluates the conditions, in order to determine which parts to include in the final program. Parts that are excluded from the final program are called the dead branches.&lt;br /&gt;
&lt;br /&gt;
All branches of conditional compilation items are syntax checked and must be syntactically correct. That is, also the dead branches must be syntactically correct.&lt;br /&gt;
&lt;br /&gt;
The compiler only calculates conditions on a need to know basis, i.e. it does not calculate conditions in dead branches.&lt;br /&gt;
&lt;br /&gt;
A condition may not depend on any code, which is located textually inside the conditional statement.&lt;br /&gt;
&lt;br /&gt;
The example below is &amp;#039;&amp;#039;&amp;#039;illegal&amp;#039;&amp;#039;&amp;#039; because the condition depends on the scope (and constant) which is declared inside the condition branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if aaa::x &amp;gt; 7 #then % ERROR!&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 3&lt;br /&gt;
end class aaa&lt;br /&gt;
#else&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 23&lt;br /&gt;
end class aaa&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2724</id>
		<title>Language Reference/Directives</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2724"/>
		<updated>2012-06-09T06:08:04Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Binary File Inclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Directives}}&lt;br /&gt;
&lt;br /&gt;
Each compiler directive starts from the &amp;lt;vp&amp;gt;#&amp;lt;/vp&amp;gt; character. The following directives are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#bininclude &amp;lt;/vp&amp;gt; - file inclusion.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; - conditional statements.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; - exporting and importing classes.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; - compilation time information.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; - compiler options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Source File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive is used to include the contents of another file into your program source code during compilation. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_include&amp;gt; :&lt;br /&gt;
   #include &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include &amp;quot;pfc\\exception\\exception.ph&amp;quot;     % Includes pfc\exception\exception.ph file&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include @&amp;quot;pfc\vpi\vpimessage\vpimessage.ph&amp;quot;     % Includes pfc\vpi\vpimessage\vpimessage.ph&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiler directive uses &amp;quot;include the first file occurrence only&amp;quot; semantics. That is, if a compilation unit contains several include directives for the same file, it will be included only one time with the first include directive.&lt;br /&gt;
&lt;br /&gt;
Each included file must contain several accomplished scopes; an included file cannot contain uncompleted scopes. That is, it should contain several accomplished interface declarations, class declarations, class implementations or/and several compiler directives.&lt;br /&gt;
&lt;br /&gt;
The compiler tries to find the specified include source file in the following way:&lt;br /&gt;
&lt;br /&gt;
#If the filename contains an absolute path, then this file should be included.&lt;br /&gt;
#Otherwise, the compiler searches for the specified include filename among the paths that had been defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option. These paths are handled consequently as they are specified in the option. In the IDE you can set these paths in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;Directories&amp;#039;&amp;#039;&amp;#039; tab of the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog.&lt;br /&gt;
&lt;br /&gt;
If the compiler does not find the specified file a compiling time error is generated.&lt;br /&gt;
&lt;br /&gt;
=== Binary File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive is used to include (during compilation) the contents of a file (specified by the {{lang2|Lexical_Elements|String_Literals|string_literal}} string) as a ::{{lang2|Built-in_entities|binary|binary}} type constant into your program source code. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_bininclude&amp;gt; :&lt;br /&gt;
   #bininclude ( &amp;lt;String_literal&amp;gt; )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This directive can be used in any places where ::{{lang2|Built-in_entities|binary|binary}} constants are allowed. The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename. The syntax is the same as in the &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive described in the previous paragraph {{lang2|Directives|Source_File_Inclusion|Source File Inclusions}}. The compiler tries to find the specified file in the same way as for &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive.&lt;br /&gt;
&lt;br /&gt;
The typical usage is like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
 myBin :  ::binary = #bininclude (&amp;quot;Bin.bin&amp;quot;). % Creates value of binary&lt;br /&gt;
                                                            % constant from &amp;quot;Bin.bin&amp;quot; file&lt;br /&gt;
 myBin2  = #bininclude (&amp;quot;Bin2.bin&amp;quot;).            % Short format of a binary&lt;br /&gt;
                                                             % constant initialization&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example. Parsing the first constant &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; declaration, the compiler meets the &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive. It checks whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in the directory where the source file containing this &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive is placed or whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in one of directories specified in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; list box in the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog (in directories defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option). If the compiler finds the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file, then it reads it. From the file contents the compiler forms correct data of the ::{{lang2|Built-in_entities|binary|binary}} domain and place it as the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant value. For example, if the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file contains only one &amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt; character, then the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant obtains the following value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;myBin = $[0x41]  % Here 0x41 is the hexadecimal ASCII value of &amp;#039;A&amp;#039;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exporting and Importing Classes ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; are used to determine lists of exported and imported classes, respectively. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #export &amp;lt;ClassNames&amp;gt;-comma-sep-list&lt;br /&gt;
&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #externally &amp;lt;ClassNames&amp;gt;-comma-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These compiler directives are applied only to classes {{lang|Classes|classNames}}, which do not construct objects.&lt;br /&gt;
&lt;br /&gt;
They can be used only outside scopes; that is, they cannot be used inside declarations of interfaces and classes and they cannot be used inside implementations of classes.&lt;br /&gt;
&lt;br /&gt;
By default, predicates within one executed module are hidden at runtime for all other executed modules. An &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive makes names of specified classes public outside the module in which they are declared (and implemented). Therefore, all predicates from this module declared in the classes (specified in an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive) become accessible while runtime from other executed modules.&lt;br /&gt;
&lt;br /&gt;
Usually, an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used in projects, which target modules are DLLs. It enumerates classes declared in a DLL, which should be accessible to other modules that use this DLL.&lt;br /&gt;
&lt;br /&gt;
If a compilation unit export some class, then this compilation unit should contain this class implementation.&lt;br /&gt;
&lt;br /&gt;
Also an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used to specify {{lang2|Directives|Conditional_Compilation|condition}} expressions for &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directives.&lt;br /&gt;
&lt;br /&gt;
For example, let us suppose that somewhere in the beginning of a compilation unit the compiler has met the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler, if in the subsequent code it meets an &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive with the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive used as the condition expression, for example like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then  ...  #endif   &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler evaluates the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; and, hence, the compiler executes the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the conditional compilation directive.&lt;br /&gt;
&lt;br /&gt;
For example, the following &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive with the subsequent &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&lt;br /&gt;
...&lt;br /&gt;
#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
guaranty that the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package will be included into the compilation unit.&lt;br /&gt;
&lt;br /&gt;
From the other hand, if an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive is not met by the compiler (somewhere in the compilation unit before the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive, which uses the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive as the conditional expression), then the compiler evaluates this &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt;. Hence, the compiler will not execute the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation directive. That is, the single &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive without previous &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does not requires to include the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive is counterpart to an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive can be used instead of (and concurrently with) an &amp;lt;vp&amp;gt;IMPORTS&amp;lt;/vp&amp;gt; directive in definition files. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive enumerates classes, which are declared in a module but implemented in other modules. Therefore, the compiler will not produce errors when it detects such classes. The referenced classes can be implemented (and exported) in DLLs, which can be linked to the module at runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directives can be used as &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; boolean expressions in {{lang2|Directives|Compiler_Directives|Conditional Directives}}.&lt;br /&gt;
&lt;br /&gt;
For example, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #include &amp;quot;Some package.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Information ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used to issue user-defined messages into a listing file while compilation of project modules and to interrupt compilation.&lt;br /&gt;
&lt;br /&gt;
These directives can be used either outside scopes (interface declaration, class declaration or class implementation), or inside scopes but outside sections. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_message&amp;gt;: one of&lt;br /&gt;
    #message &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #error &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #requires &amp;lt;String_literal&amp;gt; &amp;lt;Pp_dir_orrequires&amp;gt;-list-opt&lt;br /&gt;
    #orrequires &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the compiler meets any of these directives, it generates the correspondent warning message and place the directive text into a &amp;#039;&amp;#039;listing file&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A listing file name can be specified with the compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listingfile:&amp;quot;FileName&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that no empty spaces can be used between the colon &amp;lt;vp&amp;gt;:&amp;lt;/vp&amp;gt; (after &amp;lt;vp&amp;gt;/listinglile&amp;lt;/vp&amp;gt;) and &amp;lt;vp&amp;gt;&amp;quot;FileName&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default the compiler does NOT generate informative messages for the &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives. You can switch generation of these informative messages ON specifying the compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listing:message&lt;br /&gt;
/listing:requires&lt;br /&gt;
/listing:ALL&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| In this case, when the compiler meets a directive like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some message&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will place the following text into the listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : information c062: #message &amp;quot;Some message&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; (&amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;) issues arbitrary user-defined messages about the needed source (object) files into a listing file. The &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directive cannot be used alone: the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directive should immediately (separated with white spaces or comments only) precede it.&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; always terminates the compilation and issues the user-defined error message like the following into a listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : error c080: #error &amp;quot;Compilation is interrupted&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can parse and analyze these messages and accept the required actions. For example, the VDE analyzes information printed by the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives and automatically adds all needed PFC packages and standard libraries to the compiled project (See also the &amp;#039;&amp;#039;&amp;#039;Handling Project Modules&amp;#039;&amp;#039;&amp;#039; topic).&lt;br /&gt;
&lt;br /&gt;
{{Example| The directives &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#requires @&amp;quot;\Common\Sources\CommonTypes.pack&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Lib\CommonTypes.lib&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Obj\Foreign.obj&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #requires @&amp;quot;\Sources\Debug\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Debug\Tools.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #requires @&amp;quot;\Sources\Release\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Release\Tools.lib&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
#orrequires &amp;quot;SomeLibrary.lib&amp;quot;&lt;br /&gt;
#requires &amp;quot;SomePackage.pack&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #orrequires @&amp;quot;\Debug\SomePackage.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #orrequires @&amp;quot;\Release\SomePackage.lib&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt; directive can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some text&amp;quot;&lt;br /&gt;
#if someClass::someConstant &amp;gt; 0 #then&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;gt; 0&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;lt;= 0&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
class someClass&lt;br /&gt;
   #if ::compiler_version &amp;gt; 600 #then&lt;br /&gt;
       #message  &amp;quot;New compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 1.&lt;br /&gt;
   #else&lt;br /&gt;
       #message &amp;quot;Old compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 0.&lt;br /&gt;
   #endif&lt;br /&gt;
end class someClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #error &amp;quot;Debug version is not yet implemented&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Compiler options directive ===&lt;br /&gt;
&lt;br /&gt;
Compiler directive &amp;lt;vp&amp;gt;#options &amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; affects the whole compilation unit. This directive should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates a warning message and ignores the directive.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;&amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; can only contain the following compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&amp;quot;/Warning&amp;quot;&lt;br /&gt;
&amp;quot;/Check&amp;quot;&lt;br /&gt;
&amp;quot;/NOCheck&amp;quot;&lt;br /&gt;
&amp;quot;/Optimize&amp;quot;&lt;br /&gt;
&amp;quot;/DEBug&amp;quot;&lt;br /&gt;
&amp;quot;/GOAL&amp;quot;&lt;br /&gt;
&amp;quot;/MAXErrors&amp;quot;&lt;br /&gt;
&amp;quot;/MAXWarnings&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise the compiler generates the error message for invalid option.&lt;br /&gt;
If there are several &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; directives they are handled in the textual order.&lt;br /&gt;
&lt;br /&gt;
=== Conditional Compilation ===&lt;br /&gt;
&lt;br /&gt;
The conditional programming constructions are part of the Visual Prolog language. Only other compiler directives, {{lang2|Compilation_Units|Compilation_Units_and_Items|Compilation Units}}, and {{lang2|Program_Sections|Program_Sections|program sections}} (including empty) can be conditional. The following syntax is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConditionalItem&amp;gt; :&lt;br /&gt;
   #if &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;-list-opt &amp;lt;ElseIfItem&amp;gt;-list-opt &amp;lt;ElseItem&amp;gt;-opt #endif&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseIfItem&amp;gt; :&lt;br /&gt;
   #elseif &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseItem&amp;gt; :&lt;br /&gt;
   #else &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any expression, which can be evaluated to fail or succeed during compilation time.&lt;br /&gt;
&lt;br /&gt;
Each one conditional compilation statement must be in one file, that is, the compiler directives &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt; (if present), &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; of the same level of nesting must be in one file.&lt;br /&gt;
&lt;br /&gt;
During compilation the compiler evaluates the conditions, in order to determine which parts to include in the final program. Parts that are excluded from the final program are called the dead branches.&lt;br /&gt;
&lt;br /&gt;
All branches of conditional compilation items are syntax checked and must be syntactically correct. That is, also the dead branches must be syntactically correct.&lt;br /&gt;
&lt;br /&gt;
The compiler only calculates conditions on a need to know basis, i.e. it does not calculate conditions in dead branches.&lt;br /&gt;
&lt;br /&gt;
A condition may not depend on any code, which is located textually inside the conditional statement.&lt;br /&gt;
&lt;br /&gt;
The example below is &amp;#039;&amp;#039;&amp;#039;illegal&amp;#039;&amp;#039;&amp;#039; because the condition depends on the scope (and constant) which is declared inside the condition branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if aaa::x &amp;gt; 7 #then % ERROR!&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 3&lt;br /&gt;
end class aaa&lt;br /&gt;
#else&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 23&lt;br /&gt;
end class aaa&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2723</id>
		<title>Language Reference/Directives</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2723"/>
		<updated>2012-06-09T06:05:34Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Source File Inclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Directives}}&lt;br /&gt;
&lt;br /&gt;
Each compiler directive starts from the &amp;lt;vp&amp;gt;#&amp;lt;/vp&amp;gt; character. The following directives are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#bininclude &amp;lt;/vp&amp;gt; - file inclusion.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; - conditional statements.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; - exporting and importing classes.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; - compilation time information.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; - compiler options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Source File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive is used to include the contents of another file into your program source code during compilation. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_include&amp;gt; :&lt;br /&gt;
   #include &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include &amp;quot;pfc\\exception\\exception.ph&amp;quot;     % Includes pfc\exception\exception.ph file&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include @&amp;quot;pfc\vpi\vpimessage\vpimessage.ph&amp;quot;     % Includes pfc\vpi\vpimessage\vpimessage.ph&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiler directive uses &amp;quot;include the first file occurrence only&amp;quot; semantics. That is, if a compilation unit contains several include directives for the same file, it will be included only one time with the first include directive.&lt;br /&gt;
&lt;br /&gt;
Each included file must contain several accomplished scopes; an included file cannot contain uncompleted scopes. That is, it should contain several accomplished interface declarations, class declarations, class implementations or/and several compiler directives.&lt;br /&gt;
&lt;br /&gt;
The compiler tries to find the specified include source file in the following way:&lt;br /&gt;
&lt;br /&gt;
#If the filename contains an absolute path, then this file should be included.&lt;br /&gt;
#Otherwise, the compiler searches for the specified include filename among the paths that had been defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option. These paths are handled consequently as they are specified in the option. In the IDE you can set these paths in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;Directories&amp;#039;&amp;#039;&amp;#039; tab of the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog.&lt;br /&gt;
&lt;br /&gt;
If the compiler does not find the specified file a compiling time error is generated.&lt;br /&gt;
&lt;br /&gt;
=== Binary File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive is used to include (during compilation) the contents of a file (specified by the {{lang2|Lexical_Elements|String_Literals|string_literal}} string) as a ::{{lang2|Built-in_entities|binary|binary}} type constant into your program source code. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_bininclude&amp;gt; :&lt;br /&gt;
   #bininclude ( &amp;lt;String_literal&amp;gt; )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The  &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive instructs the compiler to insert the contents of the specified file as the value of a ::{{lang2|Built-in_entities|binary|binary}} constant. This directive can be used in any places where ::{{lang2|Built-in_entities|binary|binary}} constants are allowed.&lt;br /&gt;
&lt;br /&gt;
The typical usage is like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
 myBin :  ::binary = #bininclude (&amp;quot;Bin.bin&amp;quot;). % Creates value of binary&lt;br /&gt;
                                                            % constant from &amp;quot;Bin.bin&amp;quot; file&lt;br /&gt;
 myBin2  = #bininclude (&amp;quot;Bin2.bin&amp;quot;).            % Short format of a binary&lt;br /&gt;
                                                             % constant initialization&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example. Parsing the first constant &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; declaration, the compiler meets the &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive. It checks whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in the directory where the source file containing this &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive is placed or whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in one of directories specified in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; list box in the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog (in directories defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option). If the compiler finds the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file, then it reads it. From the file contents the compiler forms correct data of the ::{{lang2|Built-in_entities|binary|binary}} domain and place it as the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant value. For example, if the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file contains only one &amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt; character, then the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant obtains the following value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;myBin = $[0x41]  % Here 0x41 is the hexadecimal ASCII value of &amp;#039;A&amp;#039;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename. The syntax is the same as in the &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive described in the previous paragraph {{lang2|Directives|Source_File_Inclusion|Source File Inclusions}}. The compiler tries to find the specified file in the same way as for &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive.&lt;br /&gt;
&lt;br /&gt;
=== Exporting and Importing Classes ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; are used to determine lists of exported and imported classes, respectively. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #export &amp;lt;ClassNames&amp;gt;-comma-sep-list&lt;br /&gt;
&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #externally &amp;lt;ClassNames&amp;gt;-comma-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These compiler directives are applied only to classes {{lang|Classes|classNames}}, which do not construct objects.&lt;br /&gt;
&lt;br /&gt;
They can be used only outside scopes; that is, they cannot be used inside declarations of interfaces and classes and they cannot be used inside implementations of classes.&lt;br /&gt;
&lt;br /&gt;
By default, predicates within one executed module are hidden at runtime for all other executed modules. An &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive makes names of specified classes public outside the module in which they are declared (and implemented). Therefore, all predicates from this module declared in the classes (specified in an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive) become accessible while runtime from other executed modules.&lt;br /&gt;
&lt;br /&gt;
Usually, an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used in projects, which target modules are DLLs. It enumerates classes declared in a DLL, which should be accessible to other modules that use this DLL.&lt;br /&gt;
&lt;br /&gt;
If a compilation unit export some class, then this compilation unit should contain this class implementation.&lt;br /&gt;
&lt;br /&gt;
Also an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used to specify {{lang2|Directives|Conditional_Compilation|condition}} expressions for &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directives.&lt;br /&gt;
&lt;br /&gt;
For example, let us suppose that somewhere in the beginning of a compilation unit the compiler has met the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler, if in the subsequent code it meets an &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive with the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive used as the condition expression, for example like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then  ...  #endif   &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler evaluates the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; and, hence, the compiler executes the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the conditional compilation directive.&lt;br /&gt;
&lt;br /&gt;
For example, the following &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive with the subsequent &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&lt;br /&gt;
...&lt;br /&gt;
#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
guaranty that the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package will be included into the compilation unit.&lt;br /&gt;
&lt;br /&gt;
From the other hand, if an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive is not met by the compiler (somewhere in the compilation unit before the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive, which uses the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive as the conditional expression), then the compiler evaluates this &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt;. Hence, the compiler will not execute the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation directive. That is, the single &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive without previous &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does not requires to include the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive is counterpart to an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive can be used instead of (and concurrently with) an &amp;lt;vp&amp;gt;IMPORTS&amp;lt;/vp&amp;gt; directive in definition files. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive enumerates classes, which are declared in a module but implemented in other modules. Therefore, the compiler will not produce errors when it detects such classes. The referenced classes can be implemented (and exported) in DLLs, which can be linked to the module at runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directives can be used as &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; boolean expressions in {{lang2|Directives|Compiler_Directives|Conditional Directives}}.&lt;br /&gt;
&lt;br /&gt;
For example, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #include &amp;quot;Some package.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Information ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used to issue user-defined messages into a listing file while compilation of project modules and to interrupt compilation.&lt;br /&gt;
&lt;br /&gt;
These directives can be used either outside scopes (interface declaration, class declaration or class implementation), or inside scopes but outside sections. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_message&amp;gt;: one of&lt;br /&gt;
    #message &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #error &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #requires &amp;lt;String_literal&amp;gt; &amp;lt;Pp_dir_orrequires&amp;gt;-list-opt&lt;br /&gt;
    #orrequires &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the compiler meets any of these directives, it generates the correspondent warning message and place the directive text into a &amp;#039;&amp;#039;listing file&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A listing file name can be specified with the compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listingfile:&amp;quot;FileName&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that no empty spaces can be used between the colon &amp;lt;vp&amp;gt;:&amp;lt;/vp&amp;gt; (after &amp;lt;vp&amp;gt;/listinglile&amp;lt;/vp&amp;gt;) and &amp;lt;vp&amp;gt;&amp;quot;FileName&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default the compiler does NOT generate informative messages for the &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives. You can switch generation of these informative messages ON specifying the compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listing:message&lt;br /&gt;
/listing:requires&lt;br /&gt;
/listing:ALL&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| In this case, when the compiler meets a directive like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some message&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will place the following text into the listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : information c062: #message &amp;quot;Some message&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; (&amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;) issues arbitrary user-defined messages about the needed source (object) files into a listing file. The &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directive cannot be used alone: the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directive should immediately (separated with white spaces or comments only) precede it.&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; always terminates the compilation and issues the user-defined error message like the following into a listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : error c080: #error &amp;quot;Compilation is interrupted&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can parse and analyze these messages and accept the required actions. For example, the VDE analyzes information printed by the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives and automatically adds all needed PFC packages and standard libraries to the compiled project (See also the &amp;#039;&amp;#039;&amp;#039;Handling Project Modules&amp;#039;&amp;#039;&amp;#039; topic).&lt;br /&gt;
&lt;br /&gt;
{{Example| The directives &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#requires @&amp;quot;\Common\Sources\CommonTypes.pack&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Lib\CommonTypes.lib&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Obj\Foreign.obj&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #requires @&amp;quot;\Sources\Debug\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Debug\Tools.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #requires @&amp;quot;\Sources\Release\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Release\Tools.lib&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
#orrequires &amp;quot;SomeLibrary.lib&amp;quot;&lt;br /&gt;
#requires &amp;quot;SomePackage.pack&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #orrequires @&amp;quot;\Debug\SomePackage.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #orrequires @&amp;quot;\Release\SomePackage.lib&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt; directive can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some text&amp;quot;&lt;br /&gt;
#if someClass::someConstant &amp;gt; 0 #then&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;gt; 0&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;lt;= 0&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
class someClass&lt;br /&gt;
   #if ::compiler_version &amp;gt; 600 #then&lt;br /&gt;
       #message  &amp;quot;New compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 1.&lt;br /&gt;
   #else&lt;br /&gt;
       #message &amp;quot;Old compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 0.&lt;br /&gt;
   #endif&lt;br /&gt;
end class someClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #error &amp;quot;Debug version is not yet implemented&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Compiler options directive ===&lt;br /&gt;
&lt;br /&gt;
Compiler directive &amp;lt;vp&amp;gt;#options &amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; affects the whole compilation unit. This directive should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates a warning message and ignores the directive.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;&amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; can only contain the following compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&amp;quot;/Warning&amp;quot;&lt;br /&gt;
&amp;quot;/Check&amp;quot;&lt;br /&gt;
&amp;quot;/NOCheck&amp;quot;&lt;br /&gt;
&amp;quot;/Optimize&amp;quot;&lt;br /&gt;
&amp;quot;/DEBug&amp;quot;&lt;br /&gt;
&amp;quot;/GOAL&amp;quot;&lt;br /&gt;
&amp;quot;/MAXErrors&amp;quot;&lt;br /&gt;
&amp;quot;/MAXWarnings&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise the compiler generates the error message for invalid option.&lt;br /&gt;
If there are several &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; directives they are handled in the textual order.&lt;br /&gt;
&lt;br /&gt;
=== Conditional Compilation ===&lt;br /&gt;
&lt;br /&gt;
The conditional programming constructions are part of the Visual Prolog language. Only other compiler directives, {{lang2|Compilation_Units|Compilation_Units_and_Items|Compilation Units}}, and {{lang2|Program_Sections|Program_Sections|program sections}} (including empty) can be conditional. The following syntax is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConditionalItem&amp;gt; :&lt;br /&gt;
   #if &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;-list-opt &amp;lt;ElseIfItem&amp;gt;-list-opt &amp;lt;ElseItem&amp;gt;-opt #endif&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseIfItem&amp;gt; :&lt;br /&gt;
   #elseif &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseItem&amp;gt; :&lt;br /&gt;
   #else &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any expression, which can be evaluated to fail or succeed during compilation time.&lt;br /&gt;
&lt;br /&gt;
Each one conditional compilation statement must be in one file, that is, the compiler directives &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt; (if present), &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; of the same level of nesting must be in one file.&lt;br /&gt;
&lt;br /&gt;
During compilation the compiler evaluates the conditions, in order to determine which parts to include in the final program. Parts that are excluded from the final program are called the dead branches.&lt;br /&gt;
&lt;br /&gt;
All branches of conditional compilation items are syntax checked and must be syntactically correct. That is, also the dead branches must be syntactically correct.&lt;br /&gt;
&lt;br /&gt;
The compiler only calculates conditions on a need to know basis, i.e. it does not calculate conditions in dead branches.&lt;br /&gt;
&lt;br /&gt;
A condition may not depend on any code, which is located textually inside the conditional statement.&lt;br /&gt;
&lt;br /&gt;
The example below is &amp;#039;&amp;#039;&amp;#039;illegal&amp;#039;&amp;#039;&amp;#039; because the condition depends on the scope (and constant) which is declared inside the condition branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if aaa::x &amp;gt; 7 #then % ERROR!&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 3&lt;br /&gt;
end class aaa&lt;br /&gt;
#else&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 23&lt;br /&gt;
end class aaa&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2722</id>
		<title>Language Reference/Directives</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Directives&amp;diff=2722"/>
		<updated>2012-06-09T06:04:00Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Source File Inclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Directives}}&lt;br /&gt;
&lt;br /&gt;
Each compiler directive starts from the &amp;lt;vp&amp;gt;#&amp;lt;/vp&amp;gt; character. The following directives are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#bininclude &amp;lt;/vp&amp;gt; - file inclusion.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; - conditional statements.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; - exporting and importing classes.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; - compilation time information.&lt;br /&gt;
* &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; - compiler options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Source File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive is used to include the contents of another file into your program source code during compilation. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_include&amp;gt; :&lt;br /&gt;
   #include &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include &amp;quot;pfc\\exception\\exception.ph&amp;quot;     % Includes pfc\exception\exception.ph file&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or prefix the filename with the &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; character, like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;#include @&amp;quot;pfc\vpi\vpimessage\vpimessage.ph&amp;quot;     % Includes pfc\vpi\vpimessage\vpimessage.ph&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiler directive uses &amp;quot;include the first file occurrence only&amp;quot; semantics. That is, if a compilation unit contains several include directives for the same file, it will be included only one time with the first include directive.&lt;br /&gt;
&lt;br /&gt;
Each included file must contain several accomplished scopes; an included file cannot contain uncompleted scopes. That is, it should contain several accomplished interface declarations, class declarations, class implementations or/and several compiler directives.&lt;br /&gt;
&lt;br /&gt;
The compiler tries to find the specified include source file in the following way:&lt;br /&gt;
&lt;br /&gt;
#If the filename contains an absolute path, then this file should be included.&lt;br /&gt;
#Otherwise, the compiler searches for the specified include filename among the paths that had been defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option. These paths are handled consequently as they are specified in the option. In the IDE you can set these paths in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;Directories&amp;#039;&amp;#039;&amp;#039; tab of the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog.&lt;br /&gt;
&lt;br /&gt;
If the compiler does not find the specified file a compiling time error is generated.&lt;br /&gt;
&lt;br /&gt;
=== Binary File Inclusion ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive is used to include (during compilation) the contents of a file (specified by the {{lang2|Lexical_Elements|String_Literals|string_literal}} string) as a ::{{lang2|Built-in_entities|binary|binary}} type constant into your program source code. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_bininclude&amp;gt; :&lt;br /&gt;
   #bininclude ( &amp;lt;String_literal&amp;gt; )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The  &amp;lt;vp&amp;gt;#bininclude&amp;lt;/vp&amp;gt; compiler directive instructs the compiler to insert the contents of the specified file as the value of a ::{{lang2|Built-in_entities|binary|binary}} constant. This directive can be used in any places where ::{{lang2|Built-in_entities|binary|binary}} constants are allowed.&lt;br /&gt;
&lt;br /&gt;
The typical usage is like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;constants&lt;br /&gt;
 myBin :  ::binary = #bininclude (&amp;quot;Bin.bin&amp;quot;). % Creates value of binary&lt;br /&gt;
                                                            % constant from &amp;quot;Bin.bin&amp;quot; file&lt;br /&gt;
 myBin2  = #bininclude (&amp;quot;Bin2.bin&amp;quot;).            % Short format of a binary&lt;br /&gt;
                                                             % constant initialization&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example. Parsing the first constant &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; declaration, the compiler meets the &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive. It checks whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in the directory where the source file containing this &amp;lt;vp&amp;gt;#bininclude (&amp;quot;Bin.bin&amp;quot;)&amp;lt;/vp&amp;gt; directive is placed or whether the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file exists in one of directories specified in the &amp;#039;&amp;#039;&amp;#039;Include Directories&amp;#039;&amp;#039;&amp;#039; list box in the &amp;#039;&amp;#039;&amp;#039;Project Settings&amp;#039;&amp;#039;&amp;#039; dialog (in directories defined by the &amp;lt;vp&amp;gt;/Include&amp;lt;/vp&amp;gt; command line option). If the compiler finds the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file, then it reads it. From the file contents the compiler forms correct data of the ::{{lang2|Built-in_entities|binary|binary}} domain and place it as the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant value. For example, if the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Bin.bin&amp;quot;&amp;#039;&amp;#039;&amp;#039; file contains only one &amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt; character, then the &amp;lt;vp&amp;gt;myBin&amp;lt;/vp&amp;gt; constant obtains the following value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;myBin = $[0x41]  % Here 0x41 is the hexadecimal ASCII value of &amp;#039;A&amp;#039;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The {{lang2|Lexical_Elements|String_Literals|string_literal}} should specify an existing filename. The syntax is the same as in the &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive described in the previous paragraph {{lang2|Directives|Source_File_Inclusion|Source File Inclusions}}. The compiler tries to find the specified file in the same way as for &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; compiler directive.&lt;br /&gt;
&lt;br /&gt;
=== Exporting and Importing Classes ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; are used to determine lists of exported and imported classes, respectively. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #export &amp;lt;ClassNames&amp;gt;-comma-sep-list&lt;br /&gt;
&amp;lt;Pp_dir_export&amp;gt; :&lt;br /&gt;
   #externally &amp;lt;ClassNames&amp;gt;-comma-sep-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These compiler directives are applied only to classes {{lang|Classes|classNames}}, which do not construct objects.&lt;br /&gt;
&lt;br /&gt;
They can be used only outside scopes; that is, they cannot be used inside declarations of interfaces and classes and they cannot be used inside implementations of classes.&lt;br /&gt;
&lt;br /&gt;
By default, predicates within one executed module are hidden at runtime for all other executed modules. An &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive makes names of specified classes public outside the module in which they are declared (and implemented). Therefore, all predicates from this module declared in the classes (specified in an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive) become accessible while runtime from other executed modules.&lt;br /&gt;
&lt;br /&gt;
Usually, an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used in projects, which target modules are DLLs. It enumerates classes declared in a DLL, which should be accessible to other modules that use this DLL.&lt;br /&gt;
&lt;br /&gt;
If a compilation unit export some class, then this compilation unit should contain this class implementation.&lt;br /&gt;
&lt;br /&gt;
Also an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directives can be used to specify {{lang2|Directives|Conditional_Compilation|condition}} expressions for &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directives.&lt;br /&gt;
&lt;br /&gt;
For example, let us suppose that somewhere in the beginning of a compilation unit the compiler has met the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler, if in the subsequent code it meets an &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive with the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive used as the condition expression, for example like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then  ...  #endif   &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the compiler evaluates the &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; and, hence, the compiler executes the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the conditional compilation directive.&lt;br /&gt;
&lt;br /&gt;
For example, the following &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive with the subsequent &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#export className&lt;br /&gt;
...&lt;br /&gt;
#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
guaranty that the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package will be included into the compilation unit.&lt;br /&gt;
&lt;br /&gt;
From the other hand, if an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive is not met by the compiler (somewhere in the compilation unit before the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive, which uses the same &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive as the conditional expression), then the compiler evaluates this &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; condition expression as &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt;. Hence, the compiler will not execute the &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt; branch of the &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; conditional compilation directive. That is, the single &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt; compiler directive without previous &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; directive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #requires &amp;quot;some.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does not requires to include the &amp;lt;vp&amp;gt;&amp;quot;some.pack&amp;quot;&amp;lt;/vp&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive is counterpart to an &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; compiler directive. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive can be used instead of (and concurrently with) an &amp;lt;vp&amp;gt;IMPORTS&amp;lt;/vp&amp;gt; directive in definition files. An &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directive enumerates classes, which are declared in a module but implemented in other modules. Therefore, the compiler will not produce errors when it detects such classes. The referenced classes can be implemented (and exported) in DLLs, which can be linked to the module at runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;#export&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#externally&amp;lt;/vp&amp;gt; compiler directives can be used as &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; boolean expressions in {{lang2|Directives|Compiler_Directives|Conditional Directives}}.&lt;br /&gt;
&lt;br /&gt;
For example, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if #export className #then #include &amp;quot;Some package.pack&amp;quot; #endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile Time Information ===&lt;br /&gt;
&lt;br /&gt;
Compiler directives &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used to issue user-defined messages into a listing file while compilation of project modules and to interrupt compilation.&lt;br /&gt;
&lt;br /&gt;
These directives can be used either outside scopes (interface declaration, class declaration or class implementation), or inside scopes but outside sections. They have the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Pp_dir_message&amp;gt;: one of&lt;br /&gt;
    #message &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #error &amp;lt;String_literal&amp;gt;&lt;br /&gt;
    #requires &amp;lt;String_literal&amp;gt; &amp;lt;Pp_dir_orrequires&amp;gt;-list-opt&lt;br /&gt;
    #orrequires &amp;lt;String_literal&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the compiler meets any of these directives, it generates the correspondent warning message and place the directive text into a &amp;#039;&amp;#039;listing file&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A listing file name can be specified with the compiler directive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listingfile:&amp;quot;FileName&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that no empty spaces can be used between the colon &amp;lt;vp&amp;gt;:&amp;lt;/vp&amp;gt; (after &amp;lt;vp&amp;gt;/listinglile&amp;lt;/vp&amp;gt;) and &amp;lt;vp&amp;gt;&amp;quot;FileName&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By default the compiler does NOT generate informative messages for the &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives. You can switch generation of these informative messages ON specifying the compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;/listing:message&lt;br /&gt;
/listing:requires&lt;br /&gt;
/listing:ALL&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| In this case, when the compiler meets a directive like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some message&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it will place the following text into the listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : information c062: #message &amp;quot;Some message&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; (&amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt;) issues arbitrary user-defined messages about the needed source (object) files into a listing file. The &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directive cannot be used alone: the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directive should immediately (separated with white spaces or comments only) precede it.&lt;br /&gt;
&lt;br /&gt;
The directive &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; always terminates the compilation and issues the user-defined error message like the following into a listing file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;C:\Tests\test\test.pro(14,10) : error c080: #error &amp;quot;Compilation is interrupted&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can parse and analyze these messages and accept the required actions. For example, the VDE analyzes information printed by the &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; directives and automatically adds all needed PFC packages and standard libraries to the compiled project (See also the &amp;#039;&amp;#039;&amp;#039;Handling Project Modules&amp;#039;&amp;#039;&amp;#039; topic).&lt;br /&gt;
&lt;br /&gt;
{{Example| The directives &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#orrequires&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#requires @&amp;quot;\Common\Sources\CommonTypes.pack&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Lib\CommonTypes.lib&amp;quot;&lt;br /&gt;
#orrequires @&amp;quot;\Common\Obj\Foreign.obj&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #requires @&amp;quot;\Sources\Debug\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Debug\Tools.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #requires @&amp;quot;\Sources\Release\Tools.pack&amp;quot;&lt;br /&gt;
   #orrequires @&amp;quot;\Lib\Release\Tools.lib&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
#orrequires &amp;quot;SomeLibrary.lib&amp;quot;&lt;br /&gt;
#requires &amp;quot;SomePackage.pack&amp;quot;&lt;br /&gt;
#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #orrequires @&amp;quot;\Debug\SomePackage.lib&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #orrequires @&amp;quot;\Release\SomePackage.lib&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#message&amp;lt;/vp&amp;gt; directive can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#message &amp;quot;Some text&amp;quot;&lt;br /&gt;
#if someClass::someConstant &amp;gt; 0 #then&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;gt; 0&amp;quot;&lt;br /&gt;
#else&lt;br /&gt;
   #message &amp;quot;someClass::someConstant &amp;lt;= 0&amp;quot;&lt;br /&gt;
#endif&lt;br /&gt;
class someClass&lt;br /&gt;
   #if ::compiler_version &amp;gt; 600 #then&lt;br /&gt;
       #message  &amp;quot;New compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 1.&lt;br /&gt;
   #else&lt;br /&gt;
       #message &amp;quot;Old compiler&amp;quot;&lt;br /&gt;
       constants&lt;br /&gt;
           someConstant = 0.&lt;br /&gt;
   #endif&lt;br /&gt;
end class someClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The &amp;lt;vp&amp;gt;#error&amp;lt;/vp&amp;gt; can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if someClass::debugLevel &amp;gt; 0 #then&lt;br /&gt;
   #error &amp;quot;Debug version is not yet implemented&amp;quot;&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Compiler options directive ===&lt;br /&gt;
&lt;br /&gt;
Compiler directive &amp;lt;vp&amp;gt;#options &amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; affects the whole compilation unit. This directive should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates a warning message and ignores the directive.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;&amp;lt;string_literal&amp;gt;&amp;lt;/vp&amp;gt; can only contain the following compiler options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&amp;quot;/Warning&amp;quot;&lt;br /&gt;
&amp;quot;/Check&amp;quot;&lt;br /&gt;
&amp;quot;/NOCheck&amp;quot;&lt;br /&gt;
&amp;quot;/Optimize&amp;quot;&lt;br /&gt;
&amp;quot;/DEBug&amp;quot;&lt;br /&gt;
&amp;quot;/GOAL&amp;quot;&lt;br /&gt;
&amp;quot;/MAXErrors&amp;quot;&lt;br /&gt;
&amp;quot;/MAXWarnings&amp;quot;&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise the compiler generates the error message for invalid option.&lt;br /&gt;
If there are several &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; directives they are handled in the textual order.&lt;br /&gt;
&lt;br /&gt;
=== Conditional Compilation ===&lt;br /&gt;
&lt;br /&gt;
The conditional programming constructions are part of the Visual Prolog language. Only other compiler directives, {{lang2|Compilation_Units|Compilation_Units_and_Items|Compilation Units}}, and {{lang2|Program_Sections|Program_Sections|program sections}} (including empty) can be conditional. The following syntax is used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConditionalItem&amp;gt; :&lt;br /&gt;
   #if &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;-list-opt &amp;lt;ElseIfItem&amp;gt;-list-opt &amp;lt;ElseItem&amp;gt;-opt #endif&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseIfItem&amp;gt; :&lt;br /&gt;
   #elseif &amp;lt;Condition&amp;gt; #then &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ElseItem&amp;gt; :&lt;br /&gt;
   #else &amp;lt;CompilationItem&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Condition&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any expression, which can be evaluated to fail or succeed during compilation time.&lt;br /&gt;
&lt;br /&gt;
Each one conditional compilation statement must be in one file, that is, the compiler directives &amp;lt;vp&amp;gt;#if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;#elseif&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;#else&amp;lt;/vp&amp;gt; (if present), &amp;lt;vp&amp;gt;#endif&amp;lt;/vp&amp;gt; of the same level of nesting must be in one file.&lt;br /&gt;
&lt;br /&gt;
During compilation the compiler evaluates the conditions, in order to determine which parts to include in the final program. Parts that are excluded from the final program are called the dead branches.&lt;br /&gt;
&lt;br /&gt;
All branches of conditional compilation items are syntax checked and must be syntactically correct. That is, also the dead branches must be syntactically correct.&lt;br /&gt;
&lt;br /&gt;
The compiler only calculates conditions on a need to know basis, i.e. it does not calculate conditions in dead branches.&lt;br /&gt;
&lt;br /&gt;
A condition may not depend on any code, which is located textually inside the conditional statement.&lt;br /&gt;
&lt;br /&gt;
The example below is &amp;#039;&amp;#039;&amp;#039;illegal&amp;#039;&amp;#039;&amp;#039; because the condition depends on the scope (and constant) which is declared inside the condition branch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;#if aaa::x &amp;gt; 7 #then % ERROR!&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 3&lt;br /&gt;
end class aaa&lt;br /&gt;
#else&lt;br /&gt;
class aaa&lt;br /&gt;
    constants&lt;br /&gt;
        x = 23&lt;br /&gt;
end class aaa&lt;br /&gt;
#endif&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Predicates&amp;diff=2717</id>
		<title>Language Reference/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Predicates&amp;diff=2717"/>
		<updated>2012-05-29T03:20:33Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* programPoint */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Predicates}}&lt;br /&gt;
&lt;br /&gt;
=== Predicates Sections ===&lt;br /&gt;
&lt;br /&gt;
A predicates section declares a set of object or class predicates in the current scope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicatesSection&amp;gt; :&lt;br /&gt;
   class-opt predicates &amp;lt;PredicateDeclaration&amp;gt;-dot-term-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The keyword &amp;lt;vp&amp;gt;class&amp;lt;/vp&amp;gt; can be used only inside class implementations, as predicates, declared in an interface, are always object predicates and predicates, declared in a class declaration, are always class predicates already.&lt;br /&gt;
&lt;br /&gt;
The keyword &amp;lt;vp&amp;gt;class&amp;lt;/vp&amp;gt; can be used only inside class implementations, since:&lt;br /&gt;
* predicates declared in an interface are always object predicates and&lt;br /&gt;
* predicates declared in a class declaration are always class predicates.&lt;br /&gt;
&lt;br /&gt;
=== Predicate Declarations ===&lt;br /&gt;
&lt;br /&gt;
The predicate declaration is used to declare the predicate in scopes in which the predicate declaration can be seen. When predicates are declared in an interface definition, this means that objects of the corresponding type must support these predicates. When predicates are declared in a class declaration, this means that the class publicly provides the declared predicates. And if predicates are declared in a class implementation, this means that the predicates are available locally. In all cases a corresponding definitions of the predicates must exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;LinkName&amp;gt; :&lt;br /&gt;
   as &amp;lt;StringLiteral&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateName&amp;gt; :&lt;br /&gt;
   &amp;lt;LowerCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here {{lang2|Domains|Predicate Domains|predicateDomainName}} is the name of a predicate domain declared in the domains section.&lt;br /&gt;
&lt;br /&gt;
A predicate declaration states the name of the predicate, its type, mode, flow (see {{lang2|Domains|Flow Pattern|predicate domains}}), and optionally a {{lang2|Domains|Calling Convention|link name}}.&lt;br /&gt;
&lt;br /&gt;
Only class predicates can have link names. If the link name is not stated then a link name is derived from the predicate name, the way this name is derived depends on the calling convention.&lt;br /&gt;
&lt;br /&gt;
If the calling convention is {{lang2|Domains|Calling Convention|apicall}} then the link name stated in the &amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt; clause is decorated anyway. If this decoration is unintended, use {{lang2|Domains|Calling Convention|stdcall}} instead.&lt;br /&gt;
&lt;br /&gt;
==== Decorated ====&lt;br /&gt;
&lt;br /&gt;
Sometimes a name must have the _...@N decoration, but the default from apicall is wrong. In such cases decorated, decoratedA and decoratedW can be used to control the decoration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    myPredicate : (string X)  language stdcall as decorated.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the link name will be &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate@4&amp;lt;/vp&amp;gt;&amp;quot;, where apicall would make it &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate&amp;lt;/vp&amp;gt;&amp;lt;vpbnf&amp;gt;W&amp;lt;/vpbnf&amp;gt;&amp;lt;vp&amp;gt;@4&amp;lt;/vp&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    myPredicate : (pointer X)  language stdcall as decoratedA.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the link name will be &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate&amp;lt;/vp&amp;gt;&amp;lt;vpbnf&amp;gt;A&amp;lt;/vpbnf&amp;gt;&amp;lt;vp&amp;gt;@4&amp;lt;/vp&amp;gt;&amp;quot;, where apicall would make it &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate@4&amp;lt;/vp&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    myPredicate : (pointer X)  language stdcall as decoratedW.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case the link name will be &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate&amp;lt;/vp&amp;gt;&amp;lt;vpbnf&amp;gt;W&amp;lt;/vpbnf&amp;gt;&amp;lt;vp&amp;gt;@4&amp;lt;/vp&amp;gt;&amp;quot;, where apicall would make it &amp;quot;&amp;lt;vp&amp;gt;_MyPredicate@4&amp;lt;/vp&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
All of them change the start of the name from xxxx to _Xxxx and all of them put @N behind. The first never uses a suffix; the second always uses A and the third always uses W. This means that the programmer is responsible for deciding which suffix is needed. But he needs not to worry about calculating argument size and initial &amp;quot;_X&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Constructors Sections ===&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vp&amp;gt;constructors&amp;lt;/vp&amp;gt; section declares a set of constructors. The constructors belong to the scope in which the &amp;lt;vp&amp;gt;constructors&amp;lt;/vp&amp;gt; section occurs (see {{lang2|Classes|Class Declarations|class declaration}} and {{lang2|Implementations|Class Implementations|class implementation}}).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstructorsSection&amp;gt; :&lt;br /&gt;
   constructors &amp;lt;ConstructorDeclaration&amp;gt;-dot-term-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Constructor sections can only occur in declarations and implementations of classes that construct objects.&lt;br /&gt;
&lt;br /&gt;
=== Constructor Declarations ===&lt;br /&gt;
&lt;br /&gt;
A constructor declaration declares a named constructor of a class. &lt;br /&gt;
&lt;br /&gt;
A constructor actually has two associated predicates:&lt;br /&gt;
&lt;br /&gt;
*A class function, which returns a new constructed object.&lt;br /&gt;
*An object predicate, which is used when initializing inherited objects.&lt;br /&gt;
&lt;br /&gt;
An associated constructor object predicate is used to perform an object initialization. This predicate can only be called from the constructor in the class itself and from a constructor in a class that inherits from the class (i.e. base class initialization).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstructorDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;ConstructorName&amp;gt; : &amp;lt;PredicateDomain&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is illegal to state a predicate mode for constructors, constructors always have &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; mode.&lt;br /&gt;
&lt;br /&gt;
{{Example| Consider the following class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class test_class : test&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (integer Argument).&lt;br /&gt;
end class test_class&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The associated class level predicate has the following signature:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class predicates&lt;br /&gt;
    new : (integer) -&amp;gt; test.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whereas the associated object level predicate has the following signature:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    new : (integer).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also consider the following implementation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement test2_class inherits test_class&lt;br /&gt;
    clauses&lt;br /&gt;
        new() :-&lt;br /&gt;
            test_class::new(7),  % invoke the base class constructor on &amp;quot;This&amp;quot;&lt;br /&gt;
            p(test_class::new(8)). % create a new object of the base class and pass it to p(...)&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first call to &amp;lt;vp&amp;gt;test_class::new&amp;lt;/vp&amp;gt; does &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; return a value, therefore it is a call to the non-function &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; version of the constructor. I.e. it is an invocation of the base class constructor on &amp;quot;&amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The second call on the other hand &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;does&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; return a value, therefore it is a call to the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;class&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; function version of the constructor. I.e. we are creating a new object.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Predicates from Interface ===&lt;br /&gt;
&lt;br /&gt;
An interface can support a subset of another interface by stating the predicates in a predicates from section. The &amp;lt;vp&amp;gt;predicates&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;from&amp;lt;/vp&amp;gt; section names the interface and all supported predicates. The predicates are stated by name or by name and arity.&lt;br /&gt;
&lt;br /&gt;
If an interface supports a subset of another interface it is neither subtype or super-type related to the other interface.&lt;br /&gt;
&lt;br /&gt;
The important thing about the &amp;lt;vp&amp;gt;predicates&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;from&amp;lt;/vp&amp;gt; section is that the mentioned predicates retain their origin interface. Therefore:&lt;br /&gt;
&lt;br /&gt;
*there will be no support conflict with any predicates from the origin interface;&lt;br /&gt;
*they can be inherited as the predicates from the origin interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicatesFromInterface&amp;gt; :&lt;br /&gt;
    predicates from &amp;lt;InterfaceName&amp;gt; &amp;lt;PredicateNameWithArity&amp;gt;-comma-sep-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vpbnf&amp;gt;&amp;lt;PredicatesFromInterface&amp;gt;&amp;lt;/vpbnf&amp;gt; can only be used in interface definitions.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface aaa&lt;br /&gt;
    predicates&lt;br /&gt;
        ppp : ().&lt;br /&gt;
        qqq : ().&lt;br /&gt;
end interface aaa&lt;br /&gt;
&lt;br /&gt;
interface bbb&lt;br /&gt;
    predicates from aaa&lt;br /&gt;
        ppp&lt;br /&gt;
    predicates&lt;br /&gt;
        rrr : ().&lt;br /&gt;
end interface bbb&lt;br /&gt;
&lt;br /&gt;
interface ccc supports aaa, bbb&lt;br /&gt;
end interface ccc&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Even though &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;bbb&amp;lt;/vp&amp;gt; both declare a predicate &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;ccc&amp;lt;/vp&amp;gt; can support them both without any conflicts, because &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; has &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt; as an origin interface in all cases.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;interface aaa&lt;br /&gt;
    predicates&lt;br /&gt;
        ppp : ().&lt;br /&gt;
        qqq : ().&lt;br /&gt;
end interface aaa&lt;br /&gt;
&lt;br /&gt;
interface bbb&lt;br /&gt;
    predicates from aaa&lt;br /&gt;
        ppp&lt;br /&gt;
    predicates&lt;br /&gt;
        rrr : ().&lt;br /&gt;
end interface bbb&lt;br /&gt;
&lt;br /&gt;
class aaa_class : aaa&lt;br /&gt;
end class aaa_class&lt;br /&gt;
&lt;br /&gt;
class bbb_class : bbb&lt;br /&gt;
end class bbb_class&lt;br /&gt;
&lt;br /&gt;
implement aaa_class inherits bbb_class&lt;br /&gt;
    clauses&lt;br /&gt;
        qqq().&lt;br /&gt;
end implement aaa_class&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;aaa_class&amp;lt;/vp&amp;gt; can inherit &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; from &amp;lt;vp&amp;gt;bbb_class&amp;lt;/vp&amp;gt;, because &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; in both classes has &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt; as origin interface.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Arity ===&lt;br /&gt;
&lt;br /&gt;
A predicate that takes &amp;#039;&amp;#039;N&amp;#039;&amp;#039; arguments are said to be &amp;#039;&amp;#039;N-ary&amp;#039;&amp;#039;, or to have arity &amp;#039;&amp;#039;N&amp;#039;&amp;#039;. Predicates with different arity are always different predicates, even if they have the same name.&lt;br /&gt;
&lt;br /&gt;
In most situations the arity of a predicate is obvious from the context in which the predicate is mentioned. But in, for example, {{lang2|Predicates|Predicates from Interface|predicatesFromInterface}} sections and {{lang2|Implementations|Resolve Qualification|resolve qualifications}} the arity is not obvious.&lt;br /&gt;
&lt;br /&gt;
In order to distinguish between different arities of predicates in &amp;lt;vp&amp;gt;predicates from&amp;lt;/vp&amp;gt; sections and in {{lang2|Implementations|Resolve Qualification|resolve qualifications}}, predicate names can (optionally) be stated with arity.&lt;br /&gt;
&lt;br /&gt;
The following arities are possible:&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Name/N&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; meaning an ordinary predicate (i.e. not a function) &amp;#039;&amp;#039;Name&amp;#039;&amp;#039; of arity &amp;#039;&amp;#039;N.&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Name/N-&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; meaning a function &amp;#039;&amp;#039;Name&amp;#039;&amp;#039; of arity &amp;#039;&amp;#039;N&amp;#039;&amp;#039;.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Name/N...&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; meaning an ordinary predicate &amp;#039;&amp;#039;Name&amp;#039;&amp;#039; with &amp;#039;&amp;#039;N&amp;#039;&amp;#039; arguments followed by an &amp;lt;vpbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;&amp;lt;/vpbnf&amp;gt; argument (i.e. a varying number of arguments). (&amp;lt;vpbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;&amp;lt;/vpbnf&amp;gt; &amp;quot;...&amp;quot; can be used in predicate and predicate domain declarations as the last formal argument. In this case it means that the declared predicate (predicate domain) can have a variable number of arguments. Ellipsis flow must match an ellipsis argument and can therefore be only the last flow in the flow pattern.)&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Name/N...-&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; meaning a function &amp;#039;&amp;#039;Name&amp;#039;&amp;#039; with &amp;#039;&amp;#039;N&amp;#039;&amp;#039; arguments followed by an ellipsis argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateNameWithArity&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; &amp;lt;Arity&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Arity&amp;gt; : one of&lt;br /&gt;
   / &amp;lt;IntegerLiteral&amp;gt; &amp;lt;Ellipsis&amp;gt;-opt&lt;br /&gt;
   / &amp;lt;IntegerLiteral&amp;gt; &amp;lt;Ellipsis&amp;gt;-opt -&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In &amp;#039;&amp;#039;Name/0...&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Name/0...-&amp;gt;.&amp;#039;&amp;#039; the zero is optional and can thus be written as &amp;#039;&amp;#039;Name/...&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Name/...-&amp;gt;&amp;#039;&amp;#039;, respectively.&lt;br /&gt;
&lt;br /&gt;
=== programPoint ===&lt;br /&gt;
&lt;br /&gt;
{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt; is a value that represents a specific point in a clause.  The &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt; contains the class name, the predicate name, the source cursor (file, line and character number), the &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt; is defined in the &amp;lt;vp&amp;gt;core&amp;lt;/vp&amp;gt; class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt;&amp;#039;s are used by the exception mechanism to indicate where exceptions are raised and continued, but the usage is not limited to that purpose.&lt;br /&gt;
&lt;br /&gt;
The compiler suppors &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt;&amp;#039;s in a special way by means of the attribute &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt;, which can be added to a predicate declaration like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    raiseAnException : (integer X) [programPoint].&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding this attribute actually means that two predicates are declared, the one you have mentioned and an another one with name &amp;lt;vp&amp;gt;raiseAnException_explicit&amp;lt;/vp&amp;gt; which in addition to the arguemnts of &amp;lt;vp&amp;gt;raiseAnException&amp;lt;/vp&amp;gt; takes a &amp;lt;vp&amp;gt;programPoint&amp;lt;/vp&amp;gt; as first argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    raiseAnException : (integer X).&lt;br /&gt;
    &lt;br /&gt;
predicates&lt;br /&gt;
    raiseAnException_explicit : (programPoint ProgramPoint, integer X).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 When you call raiseAnException the compiler will actually create a program point ans call raiseAnException_explicit instead.&lt;br /&gt;
 &lt;br /&gt;
{{example|&lt;br /&gt;
 &amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    test() :-&lt;br /&gt;
        raiseAnException(17).&amp;lt;/vip&amp;gt;&lt;br /&gt;
will actually correspond to:&lt;br /&gt;
 &amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    test() :-&lt;br /&gt;
        raiseAnException_explicit(programPoint(...), 17).&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
where the program point corresponds to the point where &amp;lt;vp&amp;gt;raiseAnException&amp;lt;/vp&amp;gt; is called in the &amp;lt;vp&amp;gt;test&amp;lt;/vp&amp;gt; predicate.}}&lt;br /&gt;
&lt;br /&gt;
If you have a programPoint you can directly call the explicit predicate with it.&lt;br /&gt;
&lt;br /&gt;
{{example|&lt;br /&gt;
 &amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    raiseAnExceptio17_explicit(ProgramPoint) :-&lt;br /&gt;
        raiseAnException_explicit(ProgramPoint, 17).&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
Typically, as in this example, explicit predicates will call other explicit predicates with the programPoint they receive in order to use an &amp;quot;original&amp;quot; call point in a nested explicit predicate.}}&lt;br /&gt;
&lt;br /&gt;
Such code is treated in the usual way.  I.e. when calling &amp;lt;vp&amp;gt;raiseAnException&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;raiseAnException_explicit&amp;lt;/vp&amp;gt; will in both cases result in calling &amp;lt;vp&amp;gt;raiseAnException_explicit&amp;lt;/vp&amp;gt;, so this is the only predicate that needs an implementation.  In fact, it is illegal to state clauses for the non-explicit predicate that will never be called.&lt;br /&gt;
&lt;br /&gt;
To summarize:&lt;br /&gt;
* A predicate declaration with programPoint attribute actually declares two predicates.  A non-explicit and an explicit predicate.&lt;br /&gt;
* Calling the non-explicite predicate actually results in calling the explicit predicate with the call point as aditina argument.&lt;br /&gt;
* Only the explicit predicate should be implemented.&lt;br /&gt;
&lt;br /&gt;
The introduction of the the programPoint feature simplifies the exception mechanism as known in Visual Prolog 7.3 and before.  For example &amp;lt;vp&amp;gt;classInfo&amp;lt;/vp&amp;gt; predicates are no longer needed (though they in Visual Prolog 7.4 are still legal but deprecated to ease transition).&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2692</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2692"/>
		<updated>2011-10-28T10:57:49Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes. This section describes the general syntax of attributes and where they can be placed. It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2691</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2691"/>
		<updated>2011-10-28T10:56:38Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning.&lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4&lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2635</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2635"/>
		<updated>2011-07-06T07:09:03Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* toAny */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_name|class_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fromEllipsis|fromEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toEllipsis|toEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; from the list of &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; type values.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== fromEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fromEllipsis : (...) -&amp;gt; any* AnyTermList.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; (i.e. from the special varying parameters block).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AnyTermList = fromEllipsis(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#toEllipsis|toEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toEllipsis : (any* AnyTermList) -&amp;gt; ....&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; (i.e. the special varying parameters block) from the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;. Such &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; can be later passed to a predicate which expects the varying number of arguments (i.e. is declared with the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;)), like &amp;lt;vp&amp;gt;write/...&amp;lt;/vp&amp;gt;, at the position of the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;EllipsisBlock = toEllipsis(&amp;lt;any_term_list&amp;gt;), write(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#fromEllipsis|fromEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (any Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, any Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary/any representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] or [[#toAny|toAny/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (any Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, any Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary/any representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary or any into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2464</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2464"/>
		<updated>2010-10-16T04:03:12Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7302 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7301 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
=== Build 7302 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7302&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7302 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
=== Build 7303 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7303&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2428</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2428"/>
		<updated>2010-06-16T09:26:56Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7301 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
=== Build 7302 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7302&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2364</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2364"/>
		<updated>2010-05-22T07:01:37Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* apicall */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes how to upgrade Visual Prolog 7.2 projects to Visual Prolog 7.3, for older projects you should also read [[Visual Prolog 7.2 Upgrade Notes]].&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. It is possible to work with several versions on a single computer.&lt;br /&gt;
* The Commercial Edition will by default be installed in &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
* The Personal Edition will by default be installed to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
&lt;br /&gt;
When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates of the project file. After this, it is recommended that you rebuild the entire project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the messages suggesting adding or removing packages / modules.&lt;br /&gt;
&lt;br /&gt;
== Manual updates ==&lt;br /&gt;
&lt;br /&gt;
This section describes things that may need manual updates.&lt;br /&gt;
&lt;br /&gt;
=== apicall ===&lt;br /&gt;
&lt;br /&gt;
Predicates with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention should not longer have &amp;lt;vp&amp;gt;resolve xxxx externally&amp;lt;/vp&amp;gt; (but it is still legal to resolve such predicates from a DLL, i.e. they can have &amp;lt;vp&amp;gt;resolve xxxx externally from dll_name&amp;lt;/vp&amp;gt;). The resolves that gives a compilation error should simply be deleted. Also, such predicates cannot anymore have clauses (therefore, the declared &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention should be changed).&lt;br /&gt;
&lt;br /&gt;
=== Ambiguous null ===&lt;br /&gt;
&lt;br /&gt;
Autogenerated COM code from older versions may give ambuguity errors for constructions like: &amp;lt;vp&amp;gt;uncheckedConvert(iXxxx_native, null)&amp;lt;/vp&amp;gt; the ambiguity will disappear by gualifying &amp;lt;vp&amp;gt;null&amp;lt;/vp&amp;gt; with &amp;lt;vp&amp;gt;::&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert(iXxxx_native, ::null)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
* [[Visual Prolog 7.2 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2363</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2363"/>
		<updated>2010-05-22T06:48:31Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2362</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2362"/>
		<updated>2010-05-22T06:47:37Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* toEllipsis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_Name|class_Name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fromEllipsis|fromEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toEllipsis|toEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; from the list of &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; type values.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_Name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== fromEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fromEllipsis : (...) -&amp;gt; any* AnyTermList.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; (i.e. from the special varying parameters block).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AnyTermList = fromEllipsis(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#toEllipsis|toEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This call equals to the call to built-in predicate [[#convert|convert/2-&amp;gt;]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = convert(any, Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toEllipsis : (any* AnyTermList) -&amp;gt; ....&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; (i.e. the special varying parameters block) from the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;. Such &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; can be later passed to a predicate which expects the varying number of arguments (i.e. is declared with the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;)), like &amp;lt;vp&amp;gt;write/...&amp;lt;/vp&amp;gt;, at the position of the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;EllipsisBlock = toEllipsis(&amp;lt;any_term_list&amp;gt;), write(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#fromEllipsis|fromEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2361</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2361"/>
		<updated>2010-05-22T06:46:21Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* fromEllipsis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_Name|class_Name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fromEllipsis|fromEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toEllipsis|toEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; from the list of &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; type values.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_Name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== fromEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fromEllipsis : (...) -&amp;gt; any* AnyTermList.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;...&amp;#039;&amp;#039;&amp;#039; (i.e. from the special varying parameters block).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AnyTermList = fromEllipsis(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#toEllipsis|toEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This call equals to the call to built-in predicate [[#convert|convert/2-&amp;gt;]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = convert(any, Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toEllipsis : (any* AnyTermList) -&amp;gt; ... EllipsisBlock.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; (i.e. the special varying parameters block) from the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;. Such &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; can be later passed to a predicate which expects the varying number of arguments (i.e. is declared with the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;)), like &amp;lt;vp&amp;gt;write/...&amp;lt;/vp&amp;gt;, at the position of the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;EllipsisBlock = toEllipsis(&amp;lt;any_term_list&amp;gt;), write(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#fromEllipsis|fromEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2360</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2360"/>
		<updated>2010-05-22T06:42:37Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2359</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2359"/>
		<updated>2010-05-22T06:40:07Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate toEllipsis/1-&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2358</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2358"/>
		<updated>2010-05-22T05:45:00Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_Name|class_Name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fromEllipsis|fromEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toEllipsis|toEllipsis/1-&amp;gt;]]&lt;br /&gt;
|Creates the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; from the list of &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; type values.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_Name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== fromEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fromEllipsis : (... EllipsisBlock) -&amp;gt; any* AnyTermList.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; from the &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; (i.e. from the special varying parameters block).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AnyTermList = fromEllipsis(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#toEllipsis|toEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This call equals to the call to built-in predicate [[#convert|convert/2-&amp;gt;]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = convert(any, Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toEllipsis ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toEllipsis : (any* AnyTermList) -&amp;gt; ... EllipsisBlock.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate creates &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; (i.e. the special varying parameters block) from the list of terms of the universal type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;. Such &amp;#039;&amp;#039;EllipsisBlock&amp;#039;&amp;#039; can be later passed to a predicate which expects the varying number of arguments (i.e. is declared with the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;)), like &amp;lt;vp&amp;gt;write/...&amp;lt;/vp&amp;gt;, at the position of the ellipsis (&amp;#039;&amp;#039;...&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;EllipsisBlock = toEllipsis(&amp;lt;any_term_list&amp;gt;), write(EllipsisBlock )&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#fromEllipsis|fromEllipsis/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2357</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2357"/>
		<updated>2010-05-22T05:12:03Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* toAny */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_Name|class_Name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_Name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This call equals to the call to built-in predicate [[#convert|convert/2-&amp;gt;]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = convert(any, Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2356</id>
		<title>Language Reference/Built-in entities/Predicates</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Predicates&amp;diff=2356"/>
		<updated>2010-05-22T05:09:22Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;__NOTOC__&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#assert|assert/1]]&lt;br /&gt;
|Insert the specified fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#asserta|asserta/1]]&lt;br /&gt;
|Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#assertz|assertz/1]]&lt;br /&gt;
|Insert a fact at the end of the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#bound|bound/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Test whether the specified variable is bound to a value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#class_Name|class_Name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;ClassName&amp;#039;&amp;#039; that represents the name of the current interface or class.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compare|compare/2-&amp;gt;]]&lt;br /&gt;
|Returns the result of the variables&amp;#039; comparison.&lt;br /&gt;
|-&lt;br /&gt;
|[[#convert|convert/2-&amp;gt;]]&lt;br /&gt;
|Checked term conversion.&lt;br /&gt;
|-&lt;br /&gt;
|[[#digitsOf|digitsOf/1-&amp;gt;]]&lt;br /&gt;
|Returns precision of the specified floating-point domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#errorExit|errorExit/1]] &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Performs a run-time error with the specified return code &amp;#039;&amp;#039;ErrorNumber&amp;#039;&amp;#039; and sets the internal error information.&lt;br /&gt;
|-&lt;br /&gt;
|[[#fail|fail/0]] &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Invoke backtracking.&lt;br /&gt;
|-&lt;br /&gt;
|[[#free|free/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Check whether a variable is free.&lt;br /&gt;
|-&lt;br /&gt;
|[[#hasDomain|hasDomain/2]]&lt;br /&gt;
|Checks whether the variable &amp;#039;&amp;#039;VariableName&amp;#039;&amp;#039; has the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#isErroneous|isErroneous/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#lowerBound|lowerBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the lower bound value of the specified numeric domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#maxDigits|maxDigits/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#not|not/1]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Negate the result (success/fail) of subgoal.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_fullname|predicate_fullname/1-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateFullName&amp;#039;&amp;#039; that represent the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called. The returned predicate name is qualified with a scope&amp;#039;s name.&lt;br /&gt;
|-&lt;br /&gt;
|[[#predicate_name|predicate_name/0-&amp;gt;]]&lt;br /&gt;
|This compile time predicate returns the string &amp;#039;&amp;#039;PredicateName&amp;#039;&amp;#039; that represents the name of the predicate in which clause body &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; is called.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retract|retract/1]] &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Remove a matched fact from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractall|retractall/1]]&lt;br /&gt;
|Remove all matching facts from the matched internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#retractFactDb|retractFactDb/1]]&lt;br /&gt;
|Remove all facts from the specified named internal facts database.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOf|sizeOf/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the specified term.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sizeOfDomain|sizeOfDomain/1-&amp;gt;]]&lt;br /&gt;
|Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;#039;&amp;#039;DomainName&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_lineno|sourcefile_lineno/0-&amp;gt;]]&lt;br /&gt;
|Returns the current line number in the source file processed by the compiler .&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_name|sourcefile_name/0-&amp;gt;]]&lt;br /&gt;
|Returns the name of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#sourcefile_timestamp|sourcefile_timestamp/0-&amp;gt;]]&lt;br /&gt;
|Returns the string representing the date and time of the source file processed by the compiler.&lt;br /&gt;
|-&lt;br /&gt;
|[[#succeed|succeed/0]]&lt;br /&gt;
|The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toAny|toAny/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the value of the universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBinary|toBinary/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified Term to the binary representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toBoolean|toBoolean/1-&amp;gt;]]&lt;br /&gt;
|The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of &amp;lt;vp&amp;gt;boolean&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toString|toString/1-&amp;gt;]]&lt;br /&gt;
|Converts the specified &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; to the string representation.&lt;br /&gt;
|-&lt;br /&gt;
|[[#toTerm|toTerm/1-&amp;gt;]] &amp;lt;br&amp;gt; [[#toTerm|toTerm/2-&amp;gt;]]&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryToTerm|tryToTerm/1-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; &amp;lt;br&amp;gt; [[#tryToTerm|tryToTerm/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Converts the string/binary representation of the specified term &amp;#039;&amp;#039;SrcTerm&amp;#039;&amp;#039; into representation corresponding to the domain of &amp;#039;&amp;#039;PrologTerm&amp;#039;&amp;#039; variable of the return value.&lt;br /&gt;
|-&lt;br /&gt;
|[[#tryConvert|tryConvert/2-&amp;gt;]] &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
|Checks whether the input term &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; can be strictly converted into the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; and returns the converted term &amp;#039;&amp;#039;ReturnTerm&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
|[[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]]&lt;br /&gt;
|Unchecked conversion of domains.&lt;br /&gt;
|-&lt;br /&gt;
|[[#upperBound|upperBound/1-&amp;gt;]]&lt;br /&gt;
|Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following predicates are deprecated:&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| finally/2&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... finally ... end try&amp;lt;/vp&amp;gt; instead.&lt;br /&gt;
|-&lt;br /&gt;
| findall/3&lt;br /&gt;
| Use list comprehension &amp;lt;vp&amp;gt;[ ... || ...  ]&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|-&lt;br /&gt;
| trap/3 &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;&lt;br /&gt;
| Use &amp;lt;vp&amp;gt;try ... catch V do ... end try&amp;lt;/vp&amp;gt; instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== assert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assert : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert the specified fact at the end of the matched internal facts database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assert(Fact)&amp;lt;/vp&amp;gt; inserts &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database after any other stored facts for the corresponding database predicate. &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; has the same effect as [[#assertz|assertz/1]]. See also [[#asserta|asserta/1]]&lt;br /&gt;
&lt;br /&gt;
Notice that the combination of [[#retract|retract/1]] and &amp;lt;vp&amp;gt;assert/1&amp;lt;/vp&amp;gt; like the following can lead to endless loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;loop() :-&lt;br /&gt;
  retract(fct(X)),&lt;br /&gt;
     ...           % creating Y from X&lt;br /&gt;
     assert(fct(Y)),&lt;br /&gt;
  fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted &amp;#039;&amp;#039;last&amp;#039;&amp;#039; in the fact chain.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== asserta ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;asserta : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert a fact at the beginning of the matched internal facts database.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;asserta(Fact)&amp;lt;/vp&amp;gt; predicate inserts a &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; in the matched internal facts database before any other stored facts for the corresponding predicate. The &amp;lt;vp&amp;gt;Fact&amp;lt;/vp&amp;gt; must be a term belonging to the domain of an internal facts database. The &amp;lt;vp&amp;gt;asserta/1&amp;lt;/vp&amp;gt; applied to a single fact changes the existing instance of a fact to the specified one. See also [[#assert|assert/1]] and [[#assertz|assertz/1]].&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Attempt to a fact declared as determ, but the fact instance already exists.&lt;br /&gt;
&lt;br /&gt;
==== assertz ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;assertz : (&amp;lt;fact-term&amp;gt; FactTerm).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;assertz&amp;lt;/vp&amp;gt; does exactly the same as the [[#assert|assert/1]] predicate.&lt;br /&gt;
&lt;br /&gt;
==== bound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;bound : (&amp;lt;variable&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test whether the specified variable is bound to a value.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;bound(Variable)&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound and fails if it is free. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate is used to control flow patterns and to check the binding of reference variables. The &amp;lt;vp&amp;gt;bound&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part is instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#free|free/1]].&lt;br /&gt;
&lt;br /&gt;
==== class_Name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class_Name : () -&amp;gt; string ClassName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compile time predicate returns the string &amp;lt;vp&amp;gt;ClassName&amp;lt;/vp&amp;gt; that represents the name of the current interface or class.&lt;br /&gt;
&lt;br /&gt;
==== compare ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;compare : (A Left, A Right) -&amp;gt; compareResult CompareResult.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comparison of two terms of the same domain, resturns the value of [[#compareResult|compareResult]] domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;CompareResult&amp;lt;/vp&amp;gt; = compare(&amp;quot;&amp;lt;vp&amp;gt;bar&amp;lt;/vp&amp;gt;&amp;quot;, &amp;quot;&amp;lt;vp&amp;gt;foo&amp;lt;/vp&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== convert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;convert : (&amp;lt;type&amp;gt; Type, Term) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checked term conversion.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; = convert(returnDomain, &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;returnDomain&amp;lt;/vpbnf&amp;gt;: Specifies a domain to which function &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; converts &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be a name of built-in Visual Prolog domain, an interface domain, a name of such user defined domain that is synonym to one of built-in Visual Prolog domains, a numeric domain, binary and pointer domains. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before the conversion.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; predicate performs a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;, returning a new term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; of the specified new domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. If &amp;lt;vp&amp;gt;convert&amp;lt;/vp&amp;gt; cannot perform the required conversion, it rises errors. The similar functionality is provided by the [[#tryConvert|tryConvert/2-&amp;gt;]] predicate, but &amp;lt;vp&amp;gt;tryConvert-&amp;gt;&amp;lt;/vp&amp;gt; fails and does not produce any runtime errors if it cannot perform the conversion.&lt;br /&gt;
&lt;br /&gt;
===== Allowed conversions =====&lt;br /&gt;
&lt;br /&gt;
* Between numerical domains.&lt;br /&gt;
* Between interface types.&lt;br /&gt;
* Between [[#string|string]] and [[#symbol|symbol]] domains.&lt;br /&gt;
* From [[#binary|binary]] to [[#pointer|pointer]].&lt;br /&gt;
* For synonyms of mentioned domains.&lt;br /&gt;
* Between [http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project reference] domains and corresponding non-reference domains.&lt;br /&gt;
&lt;br /&gt;
The contrast to these is [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]] predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; (or [[#tryConvert|tryConvert/2-&amp;gt;]]) predicate accomplishes a checked explicit conversion, when the source and target domains are statically known during the compilation. The result of an explicit conversion can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ok&amp;#039;&amp;#039;&amp;#039; the successful conversion to the target domain;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;run-time-check&amp;#039;&amp;#039;&amp;#039; the conversion to the target domain with generation of run-time checking for compatibility;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;error&amp;#039;&amp;#039;&amp;#039; the conversion is impossible, error output.&lt;br /&gt;
&lt;br /&gt;
===== Rules of Checked Explicit Conversions =====&lt;br /&gt;
&lt;br /&gt;
* Synonyms of domains are converted using the same rules that are applied to the domains themselves.&lt;br /&gt;
* Numerical domains can be converted to the numerical domains only.&lt;br /&gt;
* Integral constants are the representatives of the anonymous integral domain: &amp;lt;vp&amp;gt;[const .. const]&amp;lt;/vp&amp;gt;.&lt;br /&gt;
* Real constants are the representatives of the anonymous real domain: &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;dig [const .. const]&amp;lt;/vp&amp;gt;, where &amp;lt;vp&amp;gt;dig&amp;lt;/vp&amp;gt; is the number of the digits in mantissa without insignificant zeroes.&lt;br /&gt;
* A value of the symbol domain can be converted to the string domain and vice versa.&lt;br /&gt;
* A value of binary domain can be converted to the pointer domain.&lt;br /&gt;
* The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.&lt;br /&gt;
* All other domains cannot be converted.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Numerical Domains =====&lt;br /&gt;
&lt;br /&gt;
* The range is considered first during such conversion. If the ranges of source and target do not intersect, then an error is produced. If the ranges of source and target only partially intersect, then run-time checking is generated. Also, if one of domains is real and another is an integral one, then the integer range is converted to the real range before the comparison.&lt;br /&gt;
* When input term in real and output is integer, then &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; and [[#tryConvert|tryConvert/2-&amp;gt;]] predicates truncate the input value to the nearest integer value, which is nearer to zero.&lt;br /&gt;
&lt;br /&gt;
===== Conversions of Interface Types =====&lt;br /&gt;
&lt;br /&gt;
Predicate &amp;lt;vp&amp;gt;convert/2-&amp;gt;&amp;lt;/vp&amp;gt; allow to convert any object to any interface type. The actual correctness of such conversion is checked at runtime. When object is created, its type is internally stored, therefore when the object is passed as argument it still remember about its original type. This original type is used for checking allowed conversions. The example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface x&lt;br /&gt;
      supports a, b&lt;br /&gt;
end interface x&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If object is created by class, which implements &amp;lt;vp&amp;gt;x&amp;lt;/vp&amp;gt; interface, and then object is passed as parameter of type &amp;lt;vp&amp;gt;a&amp;lt;/vp&amp;gt; to some predicate, then it is allowed to convert the object to &amp;lt;vp&amp;gt;b&amp;lt;/vp&amp;gt; type.&lt;br /&gt;
&lt;br /&gt;
Exceptions:&lt;br /&gt;
&lt;br /&gt;
* Check range error.&lt;br /&gt;
* Unsupported interface type.&lt;br /&gt;
&lt;br /&gt;
==== digitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;digitsOf : (&amp;lt;real-domain&amp;gt; Domain) -&amp;gt; unsigned.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns precision of the specified floating-point domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Precision = digitsof(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input parameter &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). The predicate returns the number &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; that was determined by the &amp;lt;vp&amp;gt;digits&amp;lt;/vp&amp;gt; attribute in the domain declaration.&lt;br /&gt;
&lt;br /&gt;
The compiler guarantees that values of the domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; will have at least &amp;lt;vpbnf&amp;gt;&amp;lt;Precision&amp;gt;&amp;lt;/vpbnf&amp;gt; number of significant decimal digits.&lt;br /&gt;
&lt;br /&gt;
==== errorExit ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;errorExit : (unsigned ErrorNumber) erroneous.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Performs a run-time error with the specified return code &amp;lt;vp&amp;gt;ErrorNumber&amp;lt;/vp&amp;gt;, which can be used in the [[#Try-catch-finally|try-catch-finally]].&lt;br /&gt;
&lt;br /&gt;
==== fail ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fail : () failure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; predicate forces failure and, hence, always causes backtracking. A clause that fails (with &amp;lt;vp&amp;gt;fail&amp;lt;/vp&amp;gt; or for some other reason) cannot bind output arguments.&lt;br /&gt;
&lt;br /&gt;
==== free ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free : (&amp;lt;variableName&amp;gt; Variable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check whether a variable is free.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;free(Variable)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate succeeds if the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is free and fails if &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; is bound. The &amp;lt;vp&amp;gt;free&amp;lt;/vp&amp;gt; predicate treats the specified &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; as bound if any of it&amp;#039;s part are instantiated.&lt;br /&gt;
&lt;br /&gt;
See also [[#bound|bound/1]].&lt;br /&gt;
&lt;br /&gt;
==== hasDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;hasDomain : (&amp;lt;type&amp;gt; Type, &amp;lt;variable&amp;gt; Variable) procedure.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;hasDomain&amp;lt;/vp&amp;gt; is not really a predicate, but more a declaration: It states that the variable &amp;lt;vp&amp;gt;Variable&amp;lt;/vp&amp;gt; must have the type &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variable can be free, bound or of some mixed flow. The binding of the variable is not changes in any way.&lt;br /&gt;
&lt;br /&gt;
==== lowerBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;lowerBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;numeric-domain&amp;gt; LowerBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the lower bound of the specified &amp;lt;vp&amp;gt;NumericDomain&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;LowerBoundValue = lowerBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;lowerBound&amp;lt;/vp&amp;gt; returns the lower bound value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;LowerBoundValue&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable). See also [[#upperBound|upperBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
It will give a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
==== isErroneous ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous : (&amp;lt;fact-variable&amp;gt; FactVariable) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable is &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;isErroneous(factVariableName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate succeeds if the specified fact variable &amp;lt;vp&amp;gt;factVariableName&amp;lt;/vp&amp;gt; has the &amp;lt;vp&amp;gt;erroneous&amp;lt;/vp&amp;gt; value, otherwise it fails.&lt;br /&gt;
&lt;br /&gt;
==== maxDigits ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;maxDigits : (&amp;lt;real-domain&amp;gt; RealDomain) -&amp;gt; unsigned MaxDigits&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;MaxDigitsNumber = maxdigits(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The return maximal number of digits &amp;lt;vp&amp;gt;MaxDigitsNumber&amp;lt;/vp&amp;gt; for the &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter, which should be the name of a &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
==== not ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not : (&amp;lt;term&amp;gt; SubGoal) determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Succeds if the &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails, and vice versa.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;not(SubGoal)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;not&amp;lt;/vp&amp;gt; succeeds if &amp;lt;vp&amp;gt;SubGoal&amp;lt;/vp&amp;gt; fails when evaluated. Notice that SubGoal cannot bind any variables, because &amp;lt;vp&amp;gt;not(SubGoal)&amp;lt;/vp&amp;gt; only succeeds if SubGoal fails (and a failing goal does not bind anything).&lt;br /&gt;
&lt;br /&gt;
==== predicate_fullname ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_fullname : () -&amp;gt; string PredicateFullName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateFullName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_fullname&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_name|predicate_name]].&lt;br /&gt;
&lt;br /&gt;
==== predicate_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicate_name : () -&amp;gt; string PredicateName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This predicate returns the name &amp;lt;vp&amp;gt;PredicateName&amp;lt;/vp&amp;gt; of the predicate in which it is invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; can only be used inside a clause. Use of &amp;lt;vp&amp;gt;predicate_name&amp;lt;/vp&amp;gt; in other places causes a compile time error. See also [[#predicate_fullname|predicate_fullname]]&lt;br /&gt;
&lt;br /&gt;
==== retract ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract : (&amp;lt;fact-term&amp;gt; FactTerm) nondeterm anyflow.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Successively removes the first matching fact from the facts database.  Fails when no more facts match.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate deletes the first fact that matches the &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation. The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; is matched with the facts in the facts database, which means that any free variables will be bound in the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can contain any anonymous variables. That is, variables with names consisting from the single underscore &amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt; or a variable with a name starting with an underscore &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt; if the variable occurs only once in the clause. For example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retract(person(&amp;quot;Hans&amp;quot;, _Age)),&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will retract the first matched person fact that has &amp;quot;&amp;lt;vp&amp;gt;Hans&amp;lt;/vp&amp;gt;&amp;quot; as the first argument and anything as the second argument.&lt;br /&gt;
&lt;br /&gt;
When retracting a fact, which is declared to be determ, the call to &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; will be deterministic.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retractFactDb|retractFactDb]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate cannot be applied to single facts or fact variables.&lt;br /&gt;
&lt;br /&gt;
Be careful calling &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; with free &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; variable if any single fact is declared in the project current scope. If you retract a single fact, then the run-time error is generated. The &amp;lt;vp&amp;gt;retract/1&amp;lt;/vp&amp;gt; predicate fails when there are no more matches.&lt;br /&gt;
&lt;br /&gt;
==== retractall ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall : (&amp;lt;fact-term&amp;gt; FactTerm) .&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all matching facts from the facts database.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractall(FactTemplate)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; should be a fact term.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt; retracts all facts which match the given &amp;#039;&amp;#039;FactTemplate&amp;#039;&amp;#039;. It always succeeds, even if no facts were retracted.&lt;br /&gt;
&lt;br /&gt;
Attempting to retract a &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; fact will cause a compile time error.&lt;br /&gt;
&lt;br /&gt;
It is not possible to obtain any output values from &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that  &amp;lt;vp&amp;gt;FactTemplate&amp;lt;/vp&amp;gt; can have any level of instantiation, but free variables must be single underscores (&amp;quot;unconditionally anonymous&amp;quot;). In difference to [[#retract|retract/1]] &amp;quot;conditionally&amp;quot; anonymous variables with names starting from the underscore (like &amp;lt;vp&amp;gt;_AnyValue&amp;lt;/vp&amp;gt;) cannot be used in &amp;lt;vp&amp;gt;retractall/1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also [[#retract|retract/1]] and [[#retractFactDb|retractFactDb/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractFactDb ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb : (factDB FactDB).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all facts from the named internal facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;retractFactDb(FactDB)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;retractFactDb/1&amp;lt;/vp&amp;gt; removes all facts from the named facts database &amp;lt;vp&amp;gt;FactDB&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Notice, it is impossible to retract &amp;lt;vp&amp;gt;single&amp;lt;/vp&amp;gt; facts and fact variables, so the predicate leaves such ones as they are.&lt;br /&gt;
&lt;br /&gt;
See also [[#retractall|retractall/1]] and [[#retract|retract/1]].&lt;br /&gt;
&lt;br /&gt;
==== retractAll/2 ====&lt;br /&gt;
&lt;br /&gt;
Obsolete predicate! Use [[#retractFactDb|retractFactDb/1]] instead.&lt;br /&gt;
&lt;br /&gt;
==== sizeBitsOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeBitsOf : (&amp;lt;domain&amp;gt; DomainName) -&amp;gt; unsigned BitSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bits occupied in memory by an entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;BitSize = sizeBitsOf(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bits. For the integer domains &amp;lt;vp&amp;gt;sizeBitsOf/1-&amp;gt;&amp;lt;/vp&amp;gt; predicate returns the value that was defined for the size-field in a domain&amp;#039;s declaration.&lt;br /&gt;
&lt;br /&gt;
The following is always true for the integral domains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain(domain)*8 - 7 &amp;lt;= sizeBitsOf(domain) &amp;lt;= sizeOfDomain(domain)*8&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[#sizeOfDomain|sizeOfDomain]]/1-&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOf : (&amp;lt;term&amp;gt; Term) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the specified term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOf(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;sizeOf/1-&amp;gt;&amp;lt;/vp&amp;gt; function receives a term as input parameter and returns value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; that specifies the number of bytes occupied in memory by this term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== sizeOfDomain ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sizeOfDomain : (&amp;lt;domain&amp;gt; Domain) -&amp;gt; integer ByteSize.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieves the number of bytes occupied in memory by the entity of the specified domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ByteSize = sizeOfDomain(DomainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This compiling-time predicate receives the domain &amp;lt;vp&amp;gt;DomainName&amp;lt;/vp&amp;gt; as input parameter and return the size of memory that is occupied by the entity of the given domain. The result is measured in bytes. The returned value &amp;lt;vp&amp;gt;ByteSize&amp;lt;/vp&amp;gt; belongs to the integer domain. Compare with [[#sizeBitsOf|sizeBitsOf/1-&amp;gt;]], which returns size of a domain measured in bits.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_lineno ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_lineno : () -&amp;gt; unsigned LineNumber.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current line number in the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_name ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_name : () -&amp;gt; string FileName.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the name of the source file processed by the compiler.&lt;br /&gt;
&lt;br /&gt;
==== sourcefile_timestamp ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sourcefile_timestamp : () -&amp;gt; string TimeStamp..&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns a string that represents the date and time of the currently compiled source file in format &amp;lt;vp&amp;gt;YYYY-MM-DD&amp;lt;/vp&amp;gt; &amp;lt;vp&amp;gt;HH:MM:SS&amp;lt;/vp&amp;gt;. Where:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;YYYY&amp;lt;/vp&amp;gt; - Year.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Month.&lt;br /&gt;
* &amp;lt;vp&amp;gt;DD&amp;lt;/vp&amp;gt; - Day.&lt;br /&gt;
* &amp;lt;vp&amp;gt;HH&amp;lt;/vp&amp;gt; - Hour.&lt;br /&gt;
* &amp;lt;vp&amp;gt;MM&amp;lt;/vp&amp;gt; - Minute.&lt;br /&gt;
* &amp;lt;vp&amp;gt;SS&amp;lt;/vp&amp;gt; - Second.&lt;br /&gt;
&lt;br /&gt;
==== succeed ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;succeed : ().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;succeed/0&amp;lt;/vp&amp;gt; will always succeed.&lt;br /&gt;
&lt;br /&gt;
==== toAny ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toAny : (Term) -&amp;gt; any UniversalTypeValue.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to the value of universal term type [[#any|any]].&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = toAny(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This call equals to the call to built-in predicate [[#convert|convert]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UniversalTypeValue = convert(any, Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== toBinary ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBinary : (Term) -&amp;gt; binary Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to [[#binary|binary]] representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toBinary(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary, it can safely be stored in a file or sent over a network to another program. Later the obtained binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain for the reversed term should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toBoolean ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toBoolean : (&amp;lt;term&amp;gt; SubGoal) -&amp;gt; boolean Succeed.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this meta-predicate is to convert the deterministic call (to a predicate or fact) to the procedure that returns the value of [[#boolean|boolean]] domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this meta-predicate is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;True_or_False = toBoolean(deterministic_call)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;toBoolean/1-&amp;gt;&amp;lt;/vp&amp;gt; meta-predicate returns [[#boolean|boolean]] value. The result is &amp;lt;vp&amp;gt;true&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; succeeds. The result is &amp;lt;vp&amp;gt;false&amp;lt;/vp&amp;gt; if &amp;#039;&amp;#039;deterministic_call&amp;#039;&amp;#039; fails.&lt;br /&gt;
&lt;br /&gt;
==== toString ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toString : (Term) -&amp;gt; string Serialized.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the specified &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; to string representation.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Serialized = toString(Term)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a string, it can safely be stored in a file or sent over a network to another program. Later the obtained string value can be converted back to a Visual Prolog term, using [[#toTerm|toTerm/1-&amp;gt;]] function (the domain of the return value should be adequate to &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) for the reverse conversion.&lt;br /&gt;
&lt;br /&gt;
==== toTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;toTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
toTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation of the specified term &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into representation corresponding to the domain of &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Term = toTerm(Serialized) % with implicit domain&lt;br /&gt;
Term = toTerm(domainName, Serialized) % with explicit domain, domainName&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain is not specified the compiler must be able to determine the domain for the returned value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; at compile-time. Notice that binary version of &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate performs almost byte to byte conversion and only checking general compatibility of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; data with the domain required to the return value &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. The programmer is wholly responsible for providing binary data of &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; that can be correctly converted to the term of the desired domain. The &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicates are counterparts to predicates [[#toBinary|toBinary/1-&amp;gt;]] and [[#toString|toString/1-&amp;gt;]]. When a &amp;#039;&amp;#039;Term&amp;#039;&amp;#039; (of some domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;) is converted into a binary or string representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; (by [[#toBinary|toBinary/1-&amp;gt;]] or [[#toString|toString/1-&amp;gt;]] correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding &amp;lt;vp&amp;gt;toTerm/1&amp;lt;/vp&amp;gt;-&amp;gt; function can convert the obtained string/binary value &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; back to a Visual Prolog term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;. For correctness of the reverse conversion the domain of the clause variable &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt; should be adequate to the initial domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[#tryToTerm|tryToTerm]].&lt;br /&gt;
&lt;br /&gt;
It gives a compile time error if the compiler cannot determine the return domain.&lt;br /&gt;
&lt;br /&gt;
Exceptions&lt;br /&gt;
&lt;br /&gt;
* Run time errors are generated when the &amp;lt;vp&amp;gt;toTerm&amp;lt;/vp&amp;gt; predicate cannot convert the string or binary into a term of the specified domain.&lt;br /&gt;
&lt;br /&gt;
==== tryToTerm ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryToTerm : (string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (binary Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, string Serialized) -&amp;gt; Term.&lt;br /&gt;
tryToTerm : (&amp;lt;domain&amp;gt; Type, binary Serialized) -&amp;gt; Term.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Converts the string/binary representation &amp;lt;vp&amp;gt;Serialized&amp;lt;/vp&amp;gt; into a term &amp;lt;vp&amp;gt;Term&amp;lt;/vp&amp;gt;  like [[#toTerm|toTerm]]. The only difference between the predicates is that &amp;lt;vp&amp;gt;tryToTerm&amp;lt;/vp&amp;gt; fails if it cannot convert the string or binary into a term of the specified domain whereas toTerm raises an exception.&lt;br /&gt;
&lt;br /&gt;
See also [[#toTerm|toTerm]].&lt;br /&gt;
&lt;br /&gt;
==== tryConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;tryConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted determ.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the input term &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; can be strictly converted into the specified domain &amp;lt;vp&amp;gt;Type&amp;lt;/vp&amp;gt; and returns the converted term &amp;lt;vp&amp;gt;Converted&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = tryConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to convert the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the term that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; domain.&lt;br /&gt;
&lt;br /&gt;
The conversion rules are the same as of the embedded predicate [[#convert|convert/2-&amp;gt;]], but &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; fails when [[#convert|convert/2-&amp;gt;]] generates conversion errors.&lt;br /&gt;
&lt;br /&gt;
This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate tries to perform a clean and genuine conversion of the given &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; into a value of the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;. The &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate will fail if the required conversion cannot be performed. When &amp;lt;vp&amp;gt;tryConvert/2-&amp;gt;&amp;lt;/vp&amp;gt; predicate succeeds, it returns the term &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; converted to the specified domain &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
For allowed conversions and rules of checked explicit conversions see [[#convert|convert/2-&amp;gt;]] predicate.&lt;br /&gt;
&lt;br /&gt;
See also [[#uncheckedConvert|uncheckedConvert/2-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
==== uncheckedConvert ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;uncheckedConvert : (&amp;lt;type&amp;gt; Type, Value) -&amp;gt; &amp;lt;type&amp;gt; Converted.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unchecked conversion of a value to another type.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ReturnTerm = uncheckedConvert(returnDomain, InputTerm)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;returnDomain&amp;lt;/vp&amp;gt;: Specifies a domain to which &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate unsafely converts the specified &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. Here &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; can be any domain accessible in the current scope, the &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; should has the same bit-size as the &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt;. The domain name &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; must be specified at compile-time, i.e. it cannot come from a variable.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;InputTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Specifies the value that must be converted. &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; may be any Prolog term or an expression. If &amp;#039;&amp;#039;InputTerm&amp;#039;&amp;#039; is an expression, then it will be evaluated before conversion.&lt;br /&gt;
* &amp;lt;vpbnf&amp;gt;&amp;lt;ReturnTerm&amp;gt;&amp;lt;/vpbnf&amp;gt;: Returned parameter &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt; will be of &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; performs preliminary evaluation of &amp;lt;vp&amp;gt;InputTerm&amp;lt;/vp&amp;gt; (if it is an expression), change current type to &amp;#039;&amp;#039;returnDomain&amp;#039;&amp;#039; type and unifies with &amp;lt;vp&amp;gt;ReturnTerm&amp;lt;/vp&amp;gt;. The &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt; predicate performs no runtime checks. It makes only compile time checking of bit-size equality of the converted domains. So almost any term may be quite recklessly converted to any other term. So quite disastrous results may occur if you try to use variables incorrectly converted by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;. Be extremely careful implementing &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;; we strongly recommend you always, when it is possible, using of [[#convert|convert/2-&amp;gt;]] and [[#tryConvert|tryConvert/2-&amp;gt;]]. But notice that, when an object is returned by COM system it is necessary to convert it by &amp;lt;vp&amp;gt;uncheckedConvert&amp;lt;/vp&amp;gt;, as Prolog program does not have information about its actual type.&lt;br /&gt;
&lt;br /&gt;
==== upperBound ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;upperBound : (&amp;lt;numeric-domain&amp;gt; NumericDomain) -&amp;gt; &amp;lt;number-domain&amp;gt; UpperBound.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the upper bound value of the specified numeric domain.&lt;br /&gt;
&lt;br /&gt;
Call-template for this function is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;UpperBound = upperBound(domainName)&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; is a compiling-time predicate. The &amp;lt;vp&amp;gt;upperBound&amp;lt;/vp&amp;gt; returns the upper bound value of the specified numeric domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The return value &amp;lt;vp&amp;gt;UpperBound&amp;lt;/vp&amp;gt; belongs to the same domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; cannot come from a variable).&lt;br /&gt;
&lt;br /&gt;
See also [[#lowerBound|lowerBound/1-&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
Will cause a compile time error if the specified domain &amp;#039;&amp;#039;domainName&amp;#039;&amp;#039; is not numeric domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Domains&amp;diff=2355</id>
		<title>Language Reference/Built-in entities/Domains</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Built-in_entities/Domains&amp;diff=2355"/>
		<updated>2010-05-22T04:38:50Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|[[#any|any]]&lt;br /&gt;
|Universal term type.&lt;br /&gt;
|-&lt;br /&gt;
|[[#char|char]]&lt;br /&gt;
|Wide (two-bytes) character.&lt;br /&gt;
|-&lt;br /&gt;
|[[#string|string]]&lt;br /&gt;
|Wide zero-terminated sequence of wide characters.&lt;br /&gt;
|-&lt;br /&gt;
|[[#string8|string8]]&lt;br /&gt;
|Zero-terminated sequence of ASCII (one-byte) characters.&lt;br /&gt;
|-&lt;br /&gt;
|[[#symbol|symbol]]&lt;br /&gt;
|Wide zero-terminated sequence of wide characters.&lt;br /&gt;
|-&lt;br /&gt;
|[[#binary|binary]]&lt;br /&gt;
|Sequence of bytes.&lt;br /&gt;
|-&lt;br /&gt;
|[[#binaryNonAtomic|binaryNonAtomic]]&lt;br /&gt;
|Sequence of bytes.&lt;br /&gt;
|-&lt;br /&gt;
|[[#integer|integer]]&lt;br /&gt;
|Integral signed integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#integer64|integer64]]&lt;br /&gt;
|Integral signed integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#unsigned|unsigned]]&lt;br /&gt;
|Integral unsigned integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#unsigned64|unsigned64]]&lt;br /&gt;
|Integral unsigned integer number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#real|real]]&lt;br /&gt;
|Float-pointing number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#real32|real32]]&lt;br /&gt;
|Float-pointing number.&lt;br /&gt;
|-&lt;br /&gt;
|[[#pointer|pointer]]&lt;br /&gt;
|4-bytes pointer to a memory address.&lt;br /&gt;
|-&lt;br /&gt;
|[[#handle|handle]]&lt;br /&gt;
|4-bytes pointer to a memory address.&lt;br /&gt;
|-&lt;br /&gt;
|[[#boolean|boolean]]&lt;br /&gt;
|Boolean values.&lt;br /&gt;
|-&lt;br /&gt;
|[[#factDB|factDB]]&lt;br /&gt;
|Descriptors of named internal databases.&lt;br /&gt;
|-&lt;br /&gt;
|[[#compareResult|compareResult]]&lt;br /&gt;
|Values of comparison result.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== any ====&lt;br /&gt;
&lt;br /&gt;
Universal term type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;any&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The values of this domain are any terms. Such a value contains the reference to the term type library and a term itself.&lt;br /&gt;
&lt;br /&gt;
==== char ====&lt;br /&gt;
&lt;br /&gt;
Wide character.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;char&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The values of this domain are UNICODE characters. Implemented as 2 unsigned bytes.&lt;br /&gt;
&lt;br /&gt;
Only assignment and comparison (in the lexicographical sense) operations are applied to the values of this domain. The image of a character has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Char_image&amp;gt; :&lt;br /&gt;
      &amp;#039; Char_value &amp;#039;&lt;br /&gt;
&amp;lt;Char_value&amp;gt; :&lt;br /&gt;
      &amp;lt;Letter&amp;gt;&lt;br /&gt;
      &amp;lt;Digit&amp;gt;&lt;br /&gt;
      &amp;lt;Graphical_symbol&amp;gt;&lt;br /&gt;
      \ &amp;lt;Escape_seq&amp;gt;&lt;br /&gt;
&amp;lt;Escape_seq&amp;gt;:&lt;br /&gt;
      t&lt;br /&gt;
      n&lt;br /&gt;
      r&lt;br /&gt;
      \&lt;br /&gt;
      &amp;#039;&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      u HHHH&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the syntax above &amp;lt;vpbnf&amp;gt;&amp;lt;HHHH&amp;gt;&amp;lt;/vpbnf&amp;gt; correspond to 4 hexadecimal digits. Also, the backslash symbol and the single quote can be represented by an escape-sequence only.&lt;br /&gt;
&lt;br /&gt;
==== compareResult ====&lt;br /&gt;
&lt;br /&gt;
The compareResult is a built-in domain. It is used to define a comparison result. The built-in [[#compare/2-&amp;gt;|compare]] predicate&amp;#039;s result is compareResult domain.&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
   compareResult = less; equal; greater.&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== string ====&lt;br /&gt;
&lt;br /&gt;
Wide zero terminated sequence of wide characters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;string&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A string is a sequence of UNICODE characters. It&amp;#039;s implemented as a pointer to the wide zero-terminated array of wide characters. Only assignment and comparison (in the lexicographical sense) operations are applied to values of this domain.&lt;br /&gt;
&lt;br /&gt;
In source code a string literal can be specified as a set of sequences of characters surrounded by the double quotes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;StringLiteral&amp;gt;:&lt;br /&gt;
   &amp;lt;StringLiteralPart&amp;gt;-list&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;StringLiteralPart&amp;gt; :&lt;br /&gt;
   @&amp;quot; AnyCharacter-list-opt &amp;quot;&lt;br /&gt;
   &amp;quot; CharacterValue-list-opt &amp;quot;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A string literal consists of one or more &amp;lt;vpbnf&amp;gt;&amp;lt;StringLiteralPart&amp;gt;&amp;lt;/vpbnf&amp;gt;&amp;#039;s, which are concatenated. &amp;lt;vpbnf&amp;gt;&amp;lt;StringLiteralPart&amp;gt;&amp;lt;/vpbnf&amp;gt;&amp;#039;s starting with &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; does not use escape sequences, whereas &amp;lt;vpbnf&amp;gt;&amp;lt;StringLiteralPart&amp;gt;&amp;lt;/vpbnf&amp;gt;&amp;#039;s without &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; uses the following escape sequences:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;vp&amp;gt;\\&amp;lt;/vp&amp;gt; representing &amp;lt;vp&amp;gt;\&amp;lt;/vp&amp;gt;&lt;br /&gt;
*&amp;lt;vp&amp;gt;\t&amp;lt;/vp&amp;gt; representing Tab-character&lt;br /&gt;
*&amp;lt;vp&amp;gt;\n&amp;lt;/vp&amp;gt; representing newline-character&lt;br /&gt;
*&amp;lt;vp&amp;gt;\r&amp;lt;/vp&amp;gt; representing carriage return&lt;br /&gt;
*&amp;lt;vp&amp;gt;\&amp;#039;&amp;lt;/vp&amp;gt; representing single quote&lt;br /&gt;
*&amp;lt;vp&amp;gt;\&amp;quot;&amp;lt;/vp&amp;gt; representing double quote&lt;br /&gt;
*&amp;lt;vp&amp;gt;\u&amp;lt;/vp&amp;gt; followed by exactly four &amp;lt;vpbnf&amp;gt;&amp;lt;HexadecimalDigit&amp;gt;&amp;lt;/vpbnf&amp;gt;&amp;#039;s representing the Unicode character corresponding to the digits.&lt;br /&gt;
&lt;br /&gt;
The double quotes in the string can be represented by the escape-sequence only (the single quote can be represented both with an escape-sequence and a graphical symbol).&lt;br /&gt;
&lt;br /&gt;
==== string8 ====&lt;br /&gt;
&lt;br /&gt;
A term of the built-in &amp;lt;vp&amp;gt;string8&amp;lt;/vp&amp;gt; domain is a sequence of ASCII (one-byte) characters. It is implemented as a pointer to the zero terminated array of ASCII characters. Only assignment and comparison for equality (in the lexicographical sense) operations are applied to the values of this domain. Currently no literals are allowed for this domain.&lt;br /&gt;
&lt;br /&gt;
==== symbol ====&lt;br /&gt;
&lt;br /&gt;
Wide zero terminated sequence of wide characters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;symbol&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar to a string, a symbol is also a sequence of the UNICODE characters. It&amp;#039;s implemented as a pointer to an entry in a symbol table that contains strings. The operations that can be applied to symbols are the same as for strings.&lt;br /&gt;
&lt;br /&gt;
The image of a symbol is represented with a &amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039; (any string surrounded by the double quotes).&lt;br /&gt;
&lt;br /&gt;
Symbols and strings are largely interchangeable but they are stored differently. Symbols are kept in a look-up table and their addresses, rather than the symbols themselves, are stored to represent objects. This means that symbols can be matched very quickly and, if a symbol occurs repeatedly in a program, it can be stored very compactly. Strings are not kept in a look-up table. Visual Prolog examines strings character-by-character whenever they are to be matched.&lt;br /&gt;
&lt;br /&gt;
==== binary ====&lt;br /&gt;
&lt;br /&gt;
Sequence of N bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;binary&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain are used for holding binary data. A binary value is implemented as a pointer to the sequence of bytes that represents the contents of a binary term.&lt;br /&gt;
&lt;br /&gt;
The length of a binary term is situated in the &amp;#039;&amp;#039;&amp;#039;4 bytes&amp;#039;&amp;#039;&amp;#039; immediately preceding this sequence of bytes. The 4 bytes contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;TotalNumberOfBytesOccupiedByBinary = ByteLen + 4 &amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;vp&amp;gt;ByteLen&amp;lt;/vp&amp;gt; - is the length of the binary term and 4 is number of bytes occupied by size field.&lt;br /&gt;
&lt;br /&gt;
Only assignment and comparison operations are applied to values of &amp;#039;&amp;#039;&amp;#039;binary domain&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Two binary terms are compared in the following way:&lt;br /&gt;
&lt;br /&gt;
*If they are of different sizes, the bigger is considered larger.&lt;br /&gt;
*Otherwise, they are compared byte by byte, as unsigned values. Comparison stops when two differing bytes are found and the result of their comparison is the result of the comparison of the binary terms. Two binary terms are equal if they have the same sizes and all bytes are equal.&lt;br /&gt;
&lt;br /&gt;
The text syntax for binary images is determined by the &amp;lt;vpbnf&amp;gt;&amp;lt;Binary&amp;gt;&amp;lt;/vpbnf&amp;gt; rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Binary&amp;gt; :&lt;br /&gt;
       $ [ &amp;lt;Byte_value&amp;gt;-comma-sep-list-opt ]&lt;br /&gt;
&amp;lt;Byte_value&amp;gt; :&lt;br /&gt;
      &amp;lt;Expression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each &amp;#039;&amp;#039;expression&amp;#039;&amp;#039; should be calculate on compiling time and its value should be in the range from &amp;lt;vp&amp;gt;0&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;255&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== binaryNonAtomic ====&lt;br /&gt;
&lt;br /&gt;
Sequence of N bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;binaryNonAtomic&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same as [[#binary|binary]], but can contain pointer.&lt;br /&gt;
&lt;br /&gt;
==== integer ====&lt;br /&gt;
&lt;br /&gt;
Integral signed number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;integer&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 4 bytes. Arithmetic operations (&amp;lt;vp&amp;gt;+&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;-&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;/&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;*&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;^&amp;lt;/vp&amp;gt;), comparison, assignment, [[#div/2-&amp;gt;|div]], [[#mod/2-&amp;gt;|mod]], [[#quot/2-&amp;gt;|quot]], and [[#rem/2-&amp;gt;|rem]] operations are applied to values of this domain.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is from &amp;lt;vp&amp;gt;-2147483648&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;2147483647&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax for the &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt; literal is determined by the &amp;lt;vpbnf&amp;gt;&amp;lt;Integer&amp;gt;&amp;lt;/vpbnf&amp;gt; rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Integer&amp;gt; :&lt;br /&gt;
      &amp;lt;Add_operation&amp;gt;-opt 0o &amp;lt;Oct_number&amp;gt;&lt;br /&gt;
      &amp;lt;Add_operation&amp;gt;-opt &amp;lt;Dec_number&amp;gt;&lt;br /&gt;
      &amp;lt;Add_operation&amp;gt;-opt 0x &amp;lt;Hex_number&amp;gt;&lt;br /&gt;
&amp;lt;Add_operation&amp;gt; :&lt;br /&gt;
      +&lt;br /&gt;
      -&lt;br /&gt;
&amp;lt;Oct_number&amp;gt; :&lt;br /&gt;
      &amp;lt;Oct_digit&amp;gt;-list&lt;br /&gt;
&amp;lt;Oct_digit&amp;gt; : one of&lt;br /&gt;
      0 1 2 3 4 5 6 7&lt;br /&gt;
&amp;lt;Dec_number&amp;gt; :&lt;br /&gt;
      &amp;lt;Dec_digit&amp;gt;-list&lt;br /&gt;
&amp;lt;Dec_digit&amp;gt; : one of&lt;br /&gt;
      &amp;lt;Oct_digit&amp;gt; 8 9&lt;br /&gt;
&amp;lt;Hex_number&amp;gt; :&lt;br /&gt;
      &amp;lt;Hex_digit&amp;gt;-list&lt;br /&gt;
&amp;lt;Hex_digit&amp;gt; : one of&lt;br /&gt;
      &amp;lt;Dec_digit&amp;gt; a b c d e f A B C D E F&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== integer64 ====&lt;br /&gt;
&lt;br /&gt;
Integral signed number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;integer64&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 8 bytes.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is from &amp;lt;vp&amp;gt;-2^63 = -9,223,372,036,854,775,808&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;2^63-1 = 9,223,372,036,854,775,807&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax for &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; literal is the same as &amp;lt;vpbnf&amp;gt;&amp;lt;Integer&amp;gt;&amp;lt;/vpbnf&amp;gt; rule.&lt;br /&gt;
&lt;br /&gt;
The set of operations for &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; is similar to the one for &amp;lt;vpbnf&amp;gt;&amp;lt;Integer&amp;gt;&amp;lt;/vpbnf&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== unsigned ====&lt;br /&gt;
&lt;br /&gt;
Integral unsigned number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;unsigned&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 4 bytes. Arithmetic operations (&amp;lt;vp&amp;gt;+&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;-&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;/&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;*&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;^&amp;lt;/vp&amp;gt;), comparison, assignment, {{lang2|Built-in entities|operators|div/2-&amp;gt;}}, {{lang2|Built-in entities|operators|mod/2-&amp;gt;}}, {{lang2|Built-in entities|operators|rem/2-&amp;gt;}}, and {{lang2|Built-in entities|operators|quot/2-&amp;gt;}} operations are applied to values of this domain.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is from &amp;lt;vp&amp;gt;0&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;4294967295&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax for &amp;lt;vp&amp;gt;unsigned&amp;lt;/vp&amp;gt; number images is the same as for &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt; numbers. The usage of minus sign (&amp;lt;vpbnf&amp;gt;&amp;lt;UnaryMinus&amp;gt;&amp;lt;/vpbnf&amp;gt;) is not allowed for an image of an &amp;lt;vp&amp;gt;unsigned&amp;lt;/vp&amp;gt; number.&lt;br /&gt;
&lt;br /&gt;
==== unsigned64 ====&lt;br /&gt;
&lt;br /&gt;
Integral unsigned number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;unsigned64&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 8 bytes.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is from &amp;lt;vp&amp;gt;0&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;2^64-1 = 18,446,744,073,709,551,615&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax for &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; number images is the same as for &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; numbers. The usage of minus sign (&amp;lt;vpbnf&amp;gt;&amp;lt;UnaryMinus&amp;gt;&amp;lt;/vpbnf&amp;gt;) is not allowed for an image of an &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; number.&lt;br /&gt;
&lt;br /&gt;
The set of operations for &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; is similar to the one for &amp;lt;vpbnf&amp;gt;&amp;lt;Unsigned&amp;gt;&amp;lt;/vpbnf&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== real ====&lt;br /&gt;
&lt;br /&gt;
Float-pointing number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;real&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 8 bytes. This numerical real domain is introduced for the user&amp;#039;s convenience only. All arithmetic, comparison, and assignment operations are applied to values of &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is &amp;lt;vp&amp;gt;-1.7e+308&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;1.7e+308&amp;lt;/vp&amp;gt;. Values from integral domains are automatically converted to real numbers when necessary.&lt;br /&gt;
&lt;br /&gt;
The syntax for the floating-point number literal is determined by the &amp;lt;vpbnf&amp;gt;&amp;lt;Real&amp;gt;&amp;lt;/vpbnf&amp;gt; rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Real&amp;gt; :&lt;br /&gt;
      &amp;lt;Add_operation&amp;gt;-opt &amp;lt;Fraction&amp;gt; &amp;lt;Exponent&amp;gt;-opt&lt;br /&gt;
&amp;lt;Fraction&amp;gt; :&lt;br /&gt;
      &amp;lt;Dec_number&amp;gt; &amp;lt;Fractional_part&amp;gt;-opt&lt;br /&gt;
&amp;lt;Fractional_part&amp;gt; :&lt;br /&gt;
      . &amp;lt;Dec_number&amp;gt;&lt;br /&gt;
&amp;lt;Exponent&amp;gt; :&lt;br /&gt;
      &amp;lt;Exp&amp;gt; &amp;lt;Add_operation&amp;gt;-opt &amp;lt;Dec_number&amp;gt;&lt;br /&gt;
&amp;lt;Exp&amp;gt; :&lt;br /&gt;
      e&lt;br /&gt;
      E&lt;br /&gt;
&amp;lt;Add_operation&amp;gt; :&lt;br /&gt;
      +&lt;br /&gt;
      -&lt;br /&gt;
&amp;lt;Dec_number&amp;gt; :&lt;br /&gt;
      &amp;lt;Dec_digit&amp;gt;-list&lt;br /&gt;
&amp;lt;Dec_digit&amp;gt; : one of&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== real32 ====&lt;br /&gt;
&lt;br /&gt;
Float-pointing number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;real32&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Values of this domain occupy 4 bytes. This numerical &amp;lt;vp&amp;gt;real32&amp;lt;/vp&amp;gt; domain is introduced for the user&amp;#039;s convenience only. All arithmetic, comparison, and assignment operations can be applied to values of &amp;lt;vp&amp;gt;real32&amp;lt;/vp&amp;gt; domain.&lt;br /&gt;
&lt;br /&gt;
The permitted number range is &amp;lt;vp&amp;gt;-3.4e+38&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;3.4e+38&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The syntax of real32 literals is the same as &amp;lt;vp&amp;gt;real&amp;lt;/vp&amp;gt; lietrals.&lt;br /&gt;
&lt;br /&gt;
==== pointer ====&lt;br /&gt;
&lt;br /&gt;
A pointer to a memory address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;pointer&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A pointer directly corresponds to memory addresses. Only the equality operation can be applied to the values of this domain. There is a built-in &amp;#039;&amp;#039;&amp;#039;null&amp;#039;&amp;#039;&amp;#039; constant for this type&lt;br /&gt;
&lt;br /&gt;
==== handle ====&lt;br /&gt;
&lt;br /&gt;
A handle is used for Windows API function call. Values of this domain occupy 4 bytes.&lt;br /&gt;
&lt;br /&gt;
There are no operations for this domain and cannot be converted (except uncheckedConvert) to/from other domains.&lt;br /&gt;
&lt;br /&gt;
There is a built-in [[#nullHandle|nullHandle]] and [[#invalidHandle|invalidHandle]] constant  for this type&lt;br /&gt;
&lt;br /&gt;
==== boolean ====&lt;br /&gt;
&lt;br /&gt;
Boolean values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;boolean&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This domain is introduced for the user convenience only. It is treated as usual compound domain with the following definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
   boolean = false(); true().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== factDB ====&lt;br /&gt;
&lt;br /&gt;
Descriptors of named internal databases.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;factDB&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This domain has the following hidden meta-declaration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
   factDB = struct @factdb( named_internal_database_domain, object ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All user-defined names of facts sections are the constants of this domain. The compiler automatically builds the corresponding compound terms from such constants whenever it&amp;#039;s in need. At the runtime the 1st field of this structure contains the address of the corresponding domain descriptor and the 2nd field contains either zero (for class facts sections) or pointer to an object (i.e. &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt;, for object facts sections).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Language Reference Subarticle]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2354</id>
		<title>Language Reference/Domains</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Domains&amp;diff=2354"/>
		<updated>2010-05-22T04:15:41Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Domains}}&lt;br /&gt;
&lt;br /&gt;
=== Domains Sections ===&lt;br /&gt;
&lt;br /&gt;
A domain section defines a set of domains in the current scope (see {{lang|Interfaces|Interface}}, {{lang2|Classes|Class Declarations|Class Declaration}}, and {{lang2|Implementations|Class_Implementations|Class Implementation}}).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainsSection&amp;gt;:&lt;br /&gt;
    domains &amp;lt;DomainDefinition&amp;gt;-dot-term-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Domain Definitions ===&lt;br /&gt;
&lt;br /&gt;
A domain definition defines a named domain in the current scope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the domain on the right hand side denotes an interface or a compound domain, then the defined domain is synonym (i.e. identical) to the type expression. Otherwise the defined domain becomes a subtype of the domain denoted by the type expression. Here a domain name &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
There are certain places where you must use a domain name rather than a type expression:&lt;br /&gt;
&lt;br /&gt;
*as a declaration of a formal argument type;&lt;br /&gt;
*as a type of a constant or a fact variable;&lt;br /&gt;
*as a type in a list domain.&lt;br /&gt;
&lt;br /&gt;
=== Type Expressions ===&lt;br /&gt;
&lt;br /&gt;
A type expression denotes a type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeExpression&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt;&lt;br /&gt;
    &amp;lt;CompoundDomain&amp;gt;&lt;br /&gt;
    &amp;lt;ListDomain&amp;gt;&lt;br /&gt;
    &amp;lt;PredicateDomain&amp;gt;&lt;br /&gt;
    &amp;lt;IntegralDomain&amp;gt;&lt;br /&gt;
    &amp;lt;RealDomain&amp;gt;&lt;br /&gt;
    &amp;lt;TypeVariable&amp;gt;&lt;br /&gt;
    &amp;lt;TypeApplication&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Type Names ====&lt;br /&gt;
&lt;br /&gt;
A type name is either an &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; name or the name of a &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039;. We use the term &amp;#039;&amp;#039;value domain&amp;#039;&amp;#039; to specify domains whose elements are {{lang2|Basic_Concepts|Types|immutable}} (unchangeable). Here we can say that objects, belonging to domains correspondent to &amp;#039;&amp;#039;interface&amp;#039;&amp;#039; names, have mutable state and terms of any other domains are immutable. So actually value types are everything except object types. A type name (obviously) denotes the type corresponding to the name of an existing domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeName&amp;gt;:&lt;br /&gt;
    &amp;lt;InterfaceName&amp;gt;&lt;br /&gt;
    &amp;lt;DomainName&amp;gt;&lt;br /&gt;
    &amp;lt;ClassQualifiedDomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassQualifiedDomainName&amp;gt;:&lt;br /&gt;
    &amp;lt;ClassName&amp;gt;::&amp;lt;DomainName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassName&amp;gt;:&lt;br /&gt;
    &amp;lt;LowercaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;InterfaceName&amp;gt;&amp;lt;/vpbnf&amp;gt; is an interface name, &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a value domain name, and &amp;lt;vpbnf&amp;gt;&amp;lt;ClassName&amp;gt;&amp;lt;/vpbnf&amp;gt; is a class name.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains newDomain1 = existingDomain. newDomain2 = myInterface.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example the domain name &amp;lt;vp&amp;gt;existingDomain&amp;lt;/vp&amp;gt; and the interface name &amp;lt;vp&amp;gt;myInterface&amp;lt;/vp&amp;gt; are used to define new domains.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Compound Domains ====&lt;br /&gt;
&lt;br /&gt;
Compound domains (also known as algebraic data types) are used to represent lists, trees, and other tree structured values. In its simple forms compound domains are used to represent structures and enumeration values. Compound domains can have a recursive definition. They can also be mutually/indirectly recursive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CompoundDomain&amp;gt;:&lt;br /&gt;
   &amp;lt;Alignment&amp;gt;-opt &amp;lt;FunctorAlternative&amp;gt;-semicolon-sep-list&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Alignment&amp;gt;:&lt;br /&gt;
    align &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to an integral value.&lt;br /&gt;
&lt;br /&gt;
A compound domain declaration declares a list of functor alternatives with optional alignment. Alignment must be &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;2&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;4&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a compound domain consists of one functor alternative, then it is considered as structure and has representation, which is binary compatible with the appropriate structure in language C.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorAlternative&amp;gt;: &lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; &amp;lt;FunctorName&amp;gt; ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorName&amp;gt;&amp;lt;/vpbnf&amp;gt; is the name of a functor alternative it should be a {{lang2|Lexical_Elements|Identifiers|lower case identifier}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;ArgumentName&amp;gt;&amp;lt;/vpbnf&amp;gt; can be any {{lang2|Lexical_Elements|Identifiers|upper case identifier}}. The compiler ignores it.&lt;br /&gt;
&lt;br /&gt;
Compound domains  have no subtype relations to any other domains.&lt;br /&gt;
&lt;br /&gt;
If a domain is defined as being equal to a compound domain, then these two domains are synonym types rather than subtypes. Meaning that they are just two different names for the same type.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    t1 = ff(); gg(integer, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the two-ary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes an {{lang2|Built-in_entities|integer|integer}} and a term of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; itself as arguments. So the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is recursively defined.&lt;br /&gt;
&lt;br /&gt;
The following expressions are terms of the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff()&lt;br /&gt;
gg(77, ff())&lt;br /&gt;
gg(33, gg(44, gg(55, ff())))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = ff(); gg(t2). &lt;br /&gt;
    t2 = hh(t1, t1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with two alternatives. The first alternative is the null-ary functor &amp;lt;vp&amp;gt;ff&amp;lt;/vp&amp;gt;, while the second alternative is the unary functor &amp;lt;vp&amp;gt;gg&amp;lt;/vp&amp;gt;, which takes a term of the domain &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; as argument. &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is a compound domain with one alternative the functor &amp;lt;vp&amp;gt;hh&amp;lt;/vp&amp;gt;, which takes two &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; terms as argument. So the domains &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are mutually recursive.&lt;br /&gt;
&lt;br /&gt;
The following are terms in the domain &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ff() &lt;br /&gt;
gg(hh(ff(), ff())) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), ff())) &lt;br /&gt;
ggg(hh(ff(), g(hh(ff(), ff())))) &lt;br /&gt;
gg(hh(gg(hh(ff(), ff())), gg(hh(ff(), ff()))))&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&lt;br /&gt;
In this example &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; are synonym types.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(); g(integer). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Normally, it is not necessary to use empty parenthesis after null-ary functors. But in a domain definition consisting only of a single null-ary functor, empty parenthesis are required to distinguish it from a synonym/subtype definition.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt; is a compound domain with a single null-ary functor, whereas &amp;lt;vp&amp;gt;t2&amp;lt;/vp&amp;gt; is defined to be synonym to &amp;lt;vp&amp;gt;t1&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;domains &lt;br /&gt;
    t1 = f(). &lt;br /&gt;
    t2 = t1.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== List Domains ====&lt;br /&gt;
&lt;br /&gt;
List domains represent sequences of values of a certain domain. Thus, all elements in a &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; list must be of type &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListDomain&amp;gt;:&lt;br /&gt;
    &amp;lt;TypeName&amp;gt; *&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;T*&amp;lt;/vp&amp;gt; is the type of lists of &amp;lt;vp&amp;gt;T&amp;lt;/vp&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
The following syntax is used for lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListExpression&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list-opt ]&lt;br /&gt;
    [ &amp;lt;Term&amp;gt;-comma-sep-list | &amp;lt;Tail&amp;gt; ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Tail&amp;gt;:&lt;br /&gt;
    &amp;lt;Term&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;Tail&amp;gt;&amp;lt;/vpbnf&amp;gt; is a term which should have a value of the &amp;lt;vpbnf&amp;gt;&amp;lt;ListDomain&amp;gt;&amp;lt;/vpbnf&amp;gt; type. Each &amp;lt;vpbnf&amp;gt;&amp;lt;Term&amp;gt;&amp;lt;/vpbnf&amp;gt; should be of {{lang2|Domains|Type_Names|typeName}} type.&lt;br /&gt;
&lt;br /&gt;
Actually, lists are just compound domains with two functors: &amp;lt;vp&amp;gt;[]&amp;lt;/vp&amp;gt; denoting the empty list and the mix-fix functor &amp;lt;vp&amp;gt;[HD|TL]&amp;lt;/vp&amp;gt; denoting the list with head &amp;lt;vp&amp;gt;HD&amp;lt;/vp&amp;gt; and tail &amp;lt;vp&amp;gt;TL&amp;lt;/vp&amp;gt;. The head must be of the underlying element type, whereas the tail must be a list of relevant type.&lt;br /&gt;
&lt;br /&gt;
Lists are however syntactically sugared.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En | L ]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | L ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;[E1, E2, E3, ..., En]&amp;lt;/vp&amp;gt; is shorthand for &amp;lt;vp&amp;gt;[E1, E2, E3, ..., En |[}}&amp;lt;/vp&amp;gt;, which in turn is shorthand for &amp;lt;vp&amp;gt;[E1 |[ E2 |[ ...[ En | [] ]...}}]&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Predicate Domains ====&lt;br /&gt;
&lt;br /&gt;
Values of a predicate domain are predicates with the same &amp;quot;signature&amp;quot;, i.e. the same argument and return types, the same flow pattern and the same (or stronger) predicate mode.&lt;br /&gt;
&lt;br /&gt;
A predicate that returns a value is called a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, whereas a predicate that does not return a value is sometimes called an &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;ordinary&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; predicate, to stress that it is not a function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDomain&amp;gt;:&lt;br /&gt;
   ( &amp;lt;FormalArgument&amp;gt;-comma-sep-list-opt ) &amp;lt;ReturnArgument&amp;gt;-opt &lt;br /&gt;
   &amp;lt;PredicateModeAndFlow&amp;gt;-list-opt &amp;lt;CallingConvention&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;:&lt;br /&gt;
   &amp;lt;PredicateArgumentType&amp;gt; &amp;lt;VariableName&amp;gt;-opt&lt;br /&gt;
   &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ReturnArgument&amp;gt;:&lt;br /&gt;
    -&amp;gt; &amp;lt;FormalArgument&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateArgumentType&amp;gt;:&lt;br /&gt;
   &amp;lt;TypeName&amp;gt;&lt;br /&gt;
   &amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;VariableName&amp;gt;:&lt;br /&gt;
   &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;&amp;lt;/vpbnf&amp;gt; argument as the last &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;&amp;lt;/vpbnf&amp;gt; in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalArgument&amp;gt;-comma-sep-list&amp;lt;/vpbnf&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Predicate domains can have &amp;lt;vpbnf&amp;gt;&amp;lt;AnonymousIdentifier&amp;gt;&amp;lt;/vpbnf&amp;gt; as a {{lang2|Domains|Type_Expressions|predicateArgumentType}} to specify that the argument can be of any type.&lt;br /&gt;
&lt;br /&gt;
Currently, predicate domains with ellipsis can only be used in predicate declarations.&lt;br /&gt;
&lt;br /&gt;
Predicate domains that are used in domain definitions can at most state one flow.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateModeAndFlow&amp;gt;:&lt;br /&gt;
     &amp;lt;PredicateMode&amp;gt;-opt&lt;br /&gt;
     &amp;lt;FlowPattern&amp;gt;-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Predicate Mode =====&lt;br /&gt;
&lt;br /&gt;
The specified predicate mode applies for each member of a flow pattern list following it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateMode&amp;gt;: one of&lt;br /&gt;
   erroneous &lt;br /&gt;
   failure &lt;br /&gt;
   procedure &lt;br /&gt;
   determ &lt;br /&gt;
   multi &lt;br /&gt;
   nondeterm&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicate modes can be described by the following sets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;erroneous = {} &lt;br /&gt;
failure = {Fail} &lt;br /&gt;
procedure = {Succeed} &lt;br /&gt;
determ = {Fail, Succeed} &lt;br /&gt;
multi = {Succeed, BacktrackPoint} &lt;br /&gt;
nondeterm = {Fail, Succeed, BacktrackPoint}&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;Fail&amp;#039;&amp;#039; is in the set it means that the predicate can fail. If &amp;#039;&amp;#039;succeed&amp;#039;&amp;#039; is in the set it means that the predicate can succeed. If &amp;#039;&amp;#039;BacktrackPoint&amp;#039;&amp;#039; is in the set it means that the predicate can return with an active backtrack point in it.&lt;br /&gt;
&lt;br /&gt;
If such a set, say &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt;, is a subset of another set, say &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;, then we say that the mode is stronger than the other, i.e. &amp;lt;vp&amp;gt;failure&amp;lt;/vp&amp;gt; is stronger than &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A predicate domain actually contain all predicates (with correct type and flow), which have the mode specified or a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;stronger&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; mode.&lt;br /&gt;
&lt;br /&gt;
It is illegal to state a predicate mode for constructors, they always have the &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; mode.&lt;br /&gt;
&lt;br /&gt;
Omitting of a predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Omitting of flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Notice that, in difference to Visual Prolog v. 5.x, inside implementations (i.e. for a local predicates) the needed flows and modes &amp;#039;&amp;#039;&amp;#039;are NOT derived from the usages of the predicate&amp;#039;&amp;#039;&amp;#039;. Now in declarations of for local predicates omitting the predicate mode means &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt; and omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
If inside an implementation you do not want to specify all possible flows of a predicate usage explicitly, you still can deliver this duty to the compiler. For this task inside class implementations you can use the special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt;. In this case the compiler during the compilation will derive the needed flows from usages of the predicate. But if the optional preceding predicate mode is omitted before the &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; flow pattern, then the &amp;lt;vp&amp;gt;procedure mode&amp;lt;/vp&amp;gt; is always assumed.&lt;br /&gt;
&lt;br /&gt;
===== Flow Pattern =====&lt;br /&gt;
&lt;br /&gt;
The flow pattern defines the input/output direction of the arguments, which in combination with functor domains can be structures with parts of a single argument being input and other parts of the same argument being output.&lt;br /&gt;
&lt;br /&gt;
A flow pattern consists of a sequence of flows, each flow corresponds to an argument (fist flow to first argument, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FlowPattern&amp;gt;:&lt;br /&gt;
     ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt ) AnyFlow&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Flow&amp;gt;: one of&lt;br /&gt;
    i&lt;br /&gt;
    o &lt;br /&gt;
    &amp;lt;FunctorFlow&amp;gt;&lt;br /&gt;
    &amp;lt;ListFlow&amp;gt;&lt;br /&gt;
    &amp;lt;Ellipsis&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ellipsis flow must match an ellipsis argument and can therefore be only the last flow in the flow pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Ellipsis&amp;gt;:&lt;br /&gt;
    ...&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow &amp;lt;vpbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;&amp;lt;/vpbnf&amp;gt; states a functor and flows of each of the components of that flow. The functor must of course be in the domain of the corresponding argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FunctorFlow&amp;gt;:&lt;br /&gt;
    &amp;lt;FunctorName&amp;gt; ( &amp;lt;Flow&amp;gt;-comma-sep-list-opt )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A functor flow declaration cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
List flows are just like functor flows, but with the same syntactic sugaring as the list domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlow&amp;gt;:&lt;br /&gt;
    [ &amp;lt;Flow&amp;gt;-comma-sep-list-opt &amp;lt;ListFlowTail&amp;gt;-opt]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ListFlowTail&amp;gt;:&lt;br /&gt;
    | &amp;lt;Flow&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A list flow cannot contain ellipsis flow.&lt;br /&gt;
&lt;br /&gt;
When declaring a predicate the flow can be omitted. Inside an implementation (i.e. for a local predicate) the needed flows are derived from the usages of the predicate. Inside an interface or a class declaration (i.e. for a public predicate) omitting flows means that all arguments are input.&lt;br /&gt;
&lt;br /&gt;
Special flow pattern &amp;lt;vp&amp;gt;anyflow&amp;lt;/vp&amp;gt; can be stated only in declarations of local predicates (i.e. in predicate declarations inside the implementation of a class). It means that the exact flow pattern will be evaluated during the compilation. If the optional preceding predicate mode is omitted for this flow pattern, then it assumes to be a &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp1 = (integer Argument1).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; is a predicate domain. The predicates that have type &amp;lt;vp&amp;gt;pp1&amp;lt;/vp&amp;gt; takes one {{lang2|Built-in_entities|integer|integer}} argument. Since no flow-pattern is stated the argument is input, and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    pp2 = (integer Argument1) -&amp;gt; integer ReturnType.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Predicates of type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; take one {{lang2|Built-in_entities|integer|integer}} argument and returns a value of type {{lang2|Built-in_entities|integer|integer}}. Therefore, &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; is actually a function domain and the predicates that have type &amp;lt;vp&amp;gt;pp2&amp;lt;/vp&amp;gt; are actually functions. Since no flow-pattern is stated the argument is input and since no predicate mode is mentioned the predicates are &amp;lt;vp&amp;gt;procedure&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    ppp : (integer Argument1, integer Argument2) determ (o,i) (i,o) nondeterm (o,o).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate &amp;lt;vp&amp;gt;ppp&amp;lt;/vp&amp;gt; takes two {{lang2|Built-in_entities|integer|integer}} arguments. It exists in three flow variants: &amp;lt;vp&amp;gt;(o,i)&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;(i,o)&amp;lt;/vp&amp;gt;, which are &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;(o,o)&amp;lt;/vp&amp;gt;, which is &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Calling Convention =====&lt;br /&gt;
&lt;br /&gt;
The calling convention determines how arguments, etc. are passed to the predicate, it also determines how the link name is derived from a predicate name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConvention&amp;gt;:&lt;br /&gt;
     language &amp;lt;CallingConventionKind&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;CallingConventionKind&amp;gt;: one of&lt;br /&gt;
     c stdcall apicall prolog&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a calling convention is not stated, then the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; convention is assumed. The &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention is the standard convention used for Prolog predicates.&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; follows the C/C++ standard calling convention. The link name of a predicate is created from the predicate name by adding a leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; uses the &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt; link name strategy but it uses the different argument and stack handling rules. The following table shows the implementation of &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling convention:&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Feature&lt;br /&gt;
!Implementation&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing order&lt;br /&gt;
|Right to left.&lt;br /&gt;
|-&lt;br /&gt;
|Argument-passing convention&lt;br /&gt;
|By value, unless a compound domain term is passed. So it cannot be used to predicates with variable number of arguments.&lt;br /&gt;
|-&lt;br /&gt;
|Stack-maintenance responsibility&lt;br /&gt;
|Called predicate pops its own arguments from the stack.&lt;br /&gt;
|-&lt;br /&gt;
|Name-decoration convention&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|Case-translation convention&lt;br /&gt;
|No case translation of the predicate name is performed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calling convention &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the same argument and stack handling rules as &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, but for convenience to call MS Windows API functions &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; uses the naming conventions that are used by most MS Windows API functions. According to &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; naming conventions the link name of a predicate is constructed as follows:&lt;br /&gt;
&lt;br /&gt;
*an leading underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name;&lt;br /&gt;
*the predicate name in which the first letter is changed in to a capital letter;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed, if the arguments and the return type indicate an ANSI, Unicode or neutral predicate, respectively;&lt;br /&gt;
*the &amp;#039;&amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt;&amp;#039; is suffixed;&lt;br /&gt;
*the number of bytes pushed on the call stack is suffixed.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     predicateName : (integer, string) language apicall&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument types of this predicate indicates that it is a Unicode predicate (as {{lang2|Built-in_entities|string|string}} is the domain of Unicode strings). An {{lang2|Built-in_entities|integer|integer}} and a {{lang2|Built-in_entities|string|string}} each occupies 4 bytes on the call stack and, therefore, the link name becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;_PredicateNameW@8&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; is used together with the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction the name stated in the &amp;quot;&amp;lt;vp&amp;gt;as&amp;lt;/vp&amp;gt;&amp;quot; construction is decorated in the same manner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; can only be used directly in a predicate declaration, not in a predicate domain definition. In predicate domain definitions &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, must be used instead. A predicate declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention cannot have clause(s) and it also cannot be resolved externally without explicit DLL name.&lt;br /&gt;
&lt;br /&gt;
The following table compares implementations of &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;, and &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt; calling conventions (the &amp;lt;vp&amp;gt;prolog&amp;lt;/vp&amp;gt; calling convention has the special implementation, which is not discussed here):&lt;br /&gt;
&lt;br /&gt;
{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
!Keyword&lt;br /&gt;
!Stack cleanup&lt;br /&gt;
!Predicate name case-translation&lt;br /&gt;
!Link predicate name decoration convention&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Calling&amp;#039;&amp;#039;&amp;#039; predicate pops the arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|None.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the predicate name.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Called&amp;#039;&amp;#039;&amp;#039; predicate pops its own arguments from the stack.&lt;br /&gt;
|The first letter of the predicate name is changed to the capital letter.&lt;br /&gt;
|An underscore (&amp;lt;vp&amp;gt;_&amp;lt;/vp&amp;gt;) is prefixed to the name. The first letter is changed to the upper case. The &amp;#039;&amp;lt;vp&amp;gt;A&amp;lt;/vp&amp;gt;&amp;#039;, the &amp;#039;&amp;lt;vp&amp;gt;W&amp;lt;/vp&amp;gt;&amp;#039; or nothing is suffixed. The sign &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt; is suffixed. The (decimal) number of bytes in the argument list is suffixed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Visual Prolog notion of predicate domains covers both class and object members. Class members are handled straight forward, but the handling of object members requires attention. The invocation of an object predicate will get &amp;quot;back&amp;quot; in the context of the object to which the member belongs.&lt;br /&gt;
&lt;br /&gt;
{{Example| Assume the following declarations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface actionEventSource&lt;br /&gt;
domains&lt;br /&gt;
     actionListener = (actionEventSource Source) procedure (i).&lt;br /&gt;
predicates&lt;br /&gt;
     addActionListener : (actionListener Listener) procedure (i).&lt;br /&gt;
     ... end interface&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also assume a class &amp;lt;vp&amp;gt;button_class&amp;lt;/vp&amp;gt; which supports the &amp;lt;vp&amp;gt;actionEventSource&amp;lt;/vp&amp;gt;. The event is sent when the button is pressed. In &amp;lt;vp&amp;gt;myDialog_class&amp;lt;/vp&amp;gt; class, which implements a dialog, I create a button and I want to listen to its action events, so that I can react on button presses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement myDialog_class &lt;br /&gt;
clauses&lt;br /&gt;
    new() :-&lt;br /&gt;
        OkButton = button_class::new(...),&lt;br /&gt;
        OkButton:addActionListener(onOk),&lt;br /&gt;
        ...&lt;br /&gt;
facts&lt;br /&gt;
    okPressed : () determ.&lt;br /&gt;
predicates&lt;br /&gt;
    onOk : actionListener.&lt;br /&gt;
clauses&lt;br /&gt;
    onOk(Source) :-&lt;br /&gt;
        assert(okPressed()).&lt;br /&gt;
end implement&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important thing about the example is that &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; is an object member and that, when the button is pressed, the invocation of the registered &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt; will bring us back in the object that owns &amp;lt;vp&amp;gt;onOk&amp;lt;/vp&amp;gt;. This means that we have access to the object fact &amp;lt;vp&amp;gt;okPressed&amp;lt;/vp&amp;gt;, so that we can assert it.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Format Strings =====&lt;br /&gt;
&lt;br /&gt;
A formal parameter to a predicate can be marked as format string using the attribute {{lang2|Attributes|formatString|formatString}}. The format string can contain ordinary characters which are printed without modification, and format fields, that % begins with the percent &amp;#039;%&amp;#039; sign. If the percent sign is followed % by some unknown character (not the format specifier) - then % this character will  be printed without modifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
     writef : (string Format [formatstring], ...)   procedure (i,...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format fields specification is: &lt;br /&gt;
&lt;br /&gt;
[-][0][width][.precision][type] &lt;br /&gt;
&lt;br /&gt;
All fields are optional. &lt;br /&gt;
&lt;br /&gt;
[-] Hyphen indicates that the field is to be left justified; right justified is the default. Having no effect when width value is not set, or the number of characters in the actual value is greater than width value. &lt;br /&gt;
&lt;br /&gt;
[0] Zero before width means for values that zeros will be added until the minimum width is reached. If 0(zero) and -(hyphen) appear, the 0 is ignored &lt;br /&gt;
&lt;br /&gt;
[width] Positive decimal number specifying a minimum field size. If the number of characters in the actual value is less than width value - then the required number of space &amp;#039; &amp;#039; characters will be added before the value (or after it, if &amp;#039;-&amp;#039; field was set). No changes occurs if number of characters in the actual value is greater than the width value. &lt;br /&gt;
&lt;br /&gt;
[.precision] The point &amp;#039;.&amp;#039; with the following unsigned decimal number can specify either the precision of a floating-point image or the maximum number of characters to be printed from a string. &lt;br /&gt;
&lt;br /&gt;
[type] Specifies other format then the default for the given. For example, in the type field, you can give a specifier that says an integer will be formatted as an unsigned. The possible values are: &lt;br /&gt;
&lt;br /&gt;
:{|{{prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
| f || Format real&amp;#039;s in fixed-decimal notation (such as 123.4 or 0.004321). This is the default for real&amp;#039;s.&lt;br /&gt;
|-&lt;br /&gt;
| e || Format real&amp;#039;s in exponential notation (such as 1.234e+002 or 4.321e-003).&lt;br /&gt;
|-&lt;br /&gt;
| g || Format real&amp;#039;s in the shortest of f and e format, but always in e format if exponent of the value is less than -4 or greater than or equal to the precision. Trailing zeros are truncated.&lt;br /&gt;
|-&lt;br /&gt;
| d or D || Format as a signed decimal number.&lt;br /&gt;
|-&lt;br /&gt;
| u or U || Format as an unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| x or X || Format as a hexadecimal number.&lt;br /&gt;
|-&lt;br /&gt;
| o or O || Format as an octal number.&lt;br /&gt;
|-&lt;br /&gt;
| c || Format as a char.&lt;br /&gt;
|-&lt;br /&gt;
| B || Format as the Visual Prolog binary type.&lt;br /&gt;
|-&lt;br /&gt;
| R || Format as a database reference number.&lt;br /&gt;
|-&lt;br /&gt;
| P || Format as a procedure parameter.&lt;br /&gt;
|-&lt;br /&gt;
| s || Format as a string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Integral Domains ====&lt;br /&gt;
&lt;br /&gt;
Integral domains are used for representing integral numbers. They are divided in two main categories for signed and unsigned numbers. Integral domains can also have different representation size. The predefined domains {{lang2|Built-in_entities|integer|integer}} and {{lang2|Built-in_entities|unsigned|unsigned}} represent signed and unsigned numbers with natural representation length for the processor architecture (i.e. 32bit on a 32bit machine, etc).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be an integral domain and the resulting domain will be child-type (i.e. subtype) of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the size cannot be changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralDomainProperties&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralSizeDescription&amp;gt; &amp;lt;IntegralRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;IntegralRangeDescription&amp;gt; &amp;lt;IntegralSizeDescription&amp;gt;-opt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;IntegralSizeDescription&amp;gt;:&lt;br /&gt;
    bitsize &amp;lt;DomainSize&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DomainSize&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral size description declares the size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; of the integral domain, measured in bits. The compiler implement such representation to the integral domain, which has no less than the specified number of bits. The value of &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; should be positive and no greater than the maximal value supported by the compiler.&lt;br /&gt;
&lt;br /&gt;
If integral size description is omitted, then it will become the same as the parent domain. If there is no parent domain, it will become the natural size for the processor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;IntegralRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalBoundary&amp;gt;-opt .. &amp;lt;MaximalBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An integral range description declares the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits for the integral domain. If a limit is omitted, then the range of the parent domain is used. If there is no parent domain, then the &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; is used to determine respectively maximum or minimum value.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits should satisfy the limits implied by the specified bit size &amp;lt;vp&amp;gt;bitsize&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The domain bit size &amp;lt;vpbnf&amp;gt;&amp;lt;DomainSize&amp;gt;&amp;lt;/vpbnf&amp;gt; value and values of the minimal &amp;lt;vpbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; and the maximal &amp;lt;vpbnf&amp;gt;&amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vpbnf&amp;gt; limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
==== Real Domains ====&lt;br /&gt;
&lt;br /&gt;
Real domains are used to represent numbers with fractional parts (i.e. floating point numbers). Real domains can be used to represent very large and very small numbers. The built-in domain &amp;#039;&amp;#039;real&amp;#039;&amp;#039; have the natural precision for the processor architecture (or the precision given by the compiler).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomain&amp;gt;:&lt;br /&gt;
     &amp;lt;DomainName&amp;gt;-opt &amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a &amp;lt;vpbnf&amp;gt;&amp;lt;DomainName&amp;gt;&amp;lt;/vpbnf&amp;gt; is stated in front of the &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt;, then this domain must itself be a real domain and the resulting domain will be a subtype of this domain. In that case &amp;lt;vpbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;&amp;lt;/vpbnf&amp;gt; may not violate the possibility of being a subtype, i.e. the range cannot be extended and the precision cannot be increased.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealDomainProperties&amp;gt;: one of&lt;br /&gt;
    &amp;lt;RealPrecisionDescription&amp;gt; &amp;lt;RealRangeDescription&amp;gt;-opt&lt;br /&gt;
    &amp;lt;RealRangeDescription&amp;gt; &amp;lt;RealPrecisionDescription&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealPrecisionDescription&amp;gt;:&lt;br /&gt;
    digits &amp;lt;IntegralConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The real precision description declares precision of the real domain, measured in number of decimal digits. If precision is omitted then it will become the same as for the parent domain. If there is no parent domain, then it will be the natural precision for the processor or given by the compiler (in Visual Prolog v.6 the compiler limit is 15 digits). Precision have an upper and a lower limits given by the compiler, if the precisions larger than that limit is used the numbers will only obtain the processor (compiler) specified precision anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;RealRangeDescription&amp;gt;:&lt;br /&gt;
    [ &amp;lt;MinimalRealBoundary&amp;gt;-opt .. &amp;lt;MaximalRealBoundary&amp;gt;-opt ]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MinimalRealBoundary&amp;gt;:&lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;MaximalRealBoundary&amp;gt;: &lt;br /&gt;
    &amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;vpbnf&amp;gt;&amp;lt;RealConstantExpression&amp;gt;&amp;lt;/vpbnf&amp;gt; is an expression, which must be compile time evaluated to a floating point value. That is the real domain precision and limits must be calculated while compiling time.&lt;br /&gt;
&lt;br /&gt;
The real range description declares minimal and maximal limits for the real domain. If a limit is omitted then it will be the same as for the parent domain. If there is no parent domain then the largest possible range for the precision will be used.&lt;br /&gt;
&lt;br /&gt;
Notice that the specified minimum value should not exceed the specified maximum value. That is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;MinimalBoundary&amp;gt; &amp;lt;= &amp;lt;MaximalBoundary&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generic Domains ====&lt;br /&gt;
&lt;br /&gt;
This section contains the formal syntax for generic domains, for a more complete introduction to generics please see the section &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; Generics&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeVariable&amp;gt;-comma-sep-list-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A formalTypeParameterList is a list of typeVariables&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;:&lt;br /&gt;
    &amp;lt;UpperCaseIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeVariable&amp;gt;&amp;lt;/vpbnf&amp;gt; is an upper case identifier. In a domain declaration the type variable must be bound in the &amp;lt;vpbnf&amp;gt;&amp;lt;FormalTypeParameterList&amp;gt;&amp;lt;/vpbnf&amp;gt; on the left hand side of the domain definition. In a predicate declaration all free type variables are implicitly bound and scoped to that predicate declaration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;:&lt;br /&gt;
     &amp;lt;TypeName&amp;gt; {&amp;lt;TypeExpression&amp;gt;-comma-sep-list-opt }&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;vpbnf&amp;gt;&amp;lt;TypeApplication&amp;gt;&amp;lt;/vpbnf&amp;gt; is the application of a {{lang2|Domains|Type_Names|typeName}} to a list of types. The type name must be generic and the number of formal type parameters must match the number of type expressions.&lt;br /&gt;
&lt;br /&gt;
=== Universal and Root Types ===&lt;br /&gt;
&lt;br /&gt;
Visual Prolog uses some internal types, called &amp;#039;&amp;#039;root&amp;#039;&amp;#039; types and &amp;#039;&amp;#039;universal&amp;#039;&amp;#039; types.&lt;br /&gt;
&lt;br /&gt;
==== Universal Types ====&lt;br /&gt;
&lt;br /&gt;
A number literal like &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; does not have any particular type, it can be used as a value of any type that contains &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt;, including real types.&lt;br /&gt;
&lt;br /&gt;
We say that &amp;lt;vp&amp;gt;1&amp;lt;/vp&amp;gt; have a universal type. Having a universal type means that it have any type, which can represent its value.&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations also return universal types.&lt;br /&gt;
&lt;br /&gt;
==== Root Types ====&lt;br /&gt;
&lt;br /&gt;
Arithmetic operations are very liberal with their operand requirements:  You can add integers of any integer domain with each other.&lt;br /&gt;
&lt;br /&gt;
We say that arithmetic operands takes root types as arguments.  The integer root type is super-type of any integer type (regardless that it is not mentioned in their declarations).  Hence any integer type can be converted to the integer root type, and, since the arithmetic operations exist for the root types, it means one of them will work on any integer domains.&lt;br /&gt;
&lt;br /&gt;
The actual number of root types and which operands exist is a matter of library facilities, and outside the scope of this document to describe.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Generic_Interfaces_and_Classes&amp;diff=2281</id>
		<title>Language Reference/Generic Interfaces and Classes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Generic_Interfaces_and_Classes&amp;diff=2281"/>
		<updated>2010-04-06T04:49:11Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Example: Queue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Generic Interfaces and Classes}}&lt;br /&gt;
&lt;br /&gt;
{{lang|Interfaces|Interfaces}} and {{lang|Classes|classes}} can be parametrized with type parameters so that they can be used in different instantiations in different contexts.&lt;br /&gt;
&lt;br /&gt;
This section must be considered as an extension to the individual sections about:&lt;br /&gt;
* {{lang|Interfaces|Interfaces}}&lt;br /&gt;
* {{lang|Classes|Classes}}&lt;br /&gt;
* {{lang|Implementations|Implementations}}&lt;br /&gt;
&lt;br /&gt;
The pragmatic reason to use generic classes and interfaces is to declare &amp;#039;&amp;#039;&amp;#039;parametrized object facts&amp;#039;&amp;#039;&amp;#039; and implement operations on these facts.  As illustrated in the Queue example below.&lt;br /&gt;
&lt;br /&gt;
=== Example: Queue ===&lt;br /&gt;
&lt;br /&gt;
Consider this interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface queue_integer&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Value).&lt;br /&gt;
        tryGet : () -&amp;gt; integer Value.&lt;br /&gt;
end interface queue_integer&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An object of this type is a queue of integers, if you replace &amp;quot;integer&amp;quot; with &amp;quot;string&amp;quot; you would have a type describing queues of strings.&lt;br /&gt;
&lt;br /&gt;
A generic interface can be used to describe all such interfaces in a single interface definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (@Elem Value).&lt;br /&gt;
        tryGet : () -&amp;gt; @Elem Value determ.&lt;br /&gt;
end interface queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;@Elem&amp;lt;/vp&amp;gt; is a &amp;#039;&amp;#039;scope type variable&amp;#039;&amp;#039; (distinguished from local type variables by the &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;queue{integer}&amp;lt;/vp&amp;gt; represents integer-queues; &amp;lt;vp&amp;gt;queue{string}&amp;lt;/vp&amp;gt; represents string-queues; and so forth.&lt;br /&gt;
&lt;br /&gt;
We can declare a generic queue class like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class queueClass{@Elem} : queue{@Elem}&lt;br /&gt;
end class queueClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;queueClass{@Elem}&amp;lt;/vp&amp;gt; constructs objects type &amp;lt;vp&amp;gt;queue{@Elem}&amp;lt;/vp&amp;gt; for any instantiation of &amp;lt;vp&amp;gt;@Elem&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The implementation can look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement queueClass{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        queue_fact : (@Elem Value).&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Value) :-&lt;br /&gt;
            assert(queue_fact(Value)).&lt;br /&gt;
    clauses&lt;br /&gt;
        tryGet() = Value :-&lt;br /&gt;
            retract(queue_fact(Value)),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queueClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This piece of code illustrates how to create an integer queue and insert an element in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;..., Q = queueClass{integer}::new(), Q:insert(17), ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is not necessary to apply the type explicitly, instead the compiler can infer it from the context:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;..., Q = queueClass::new(), Q:insert(17), ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The compiler sees that &amp;lt;vp&amp;gt;Q&amp;lt;/vp&amp;gt; must be an integer queue, because we insert 17 into it.&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic interfaces have a list of type parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
    interface &amp;lt;InterfaceName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;InterfaceName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scope type parameters can be used in any declaration/definition in the interface.&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic interface defines all the interfaces that can be obtained by instantiating the type parameters with actual types.  The scope type parameters from the opening are bound in the entire interface.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is illegal to use same interface name for interfaces with different arity (in the same namespace):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx % xxx/0&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
interface xxx{@A, @B} % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters can be used in supported interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@P} supports yyy{@P} % legal: @P is bound&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
interface xxx supports yyy{@P} % illegal: @P must be bound&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported interfaces can be instantiated with any type expressions (as long as parameters are bound):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A} supports yyy{integer, @A*}&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generic Classes ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic classes have a list of type parameters, and constructs objects of an interface type uses the these parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
    class &amp;lt;ClassName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ConstructionType&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ConstructionType&amp;gt; :&lt;br /&gt;
   : &amp;lt;TypeExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The construction type must be generic (i.e. a generic interface).&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic class declares a class with a generic constructor.  The type of the constructed object will be inferred from the usage of the constructor.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@A} : xxx{@AAA}&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is illegal to use same class name for class with different arity (in the same namespace):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx % xxx/0&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&lt;br /&gt;
&lt;br /&gt;
class xxx{@A} : yyy{@A} % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a class and interface can have the same name, the class must construct objects of that interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
class xxx{@Q, @P} : object % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters in the construction type, etc must be bound:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class bbb : xxx{@Q} % error: Free parameter &amp;#039;@Q&amp;#039; is used in type expression&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the parameters from the class must be used in the construction type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@P} : object % error: Unused type parameter &amp;#039;@P&amp;#039;&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In class declarations scope parameter can only be used in constructors, domains and constants.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@P} : xxx{@P}&lt;br /&gt;
    domains&lt;br /&gt;
        list = @P*. % legal&lt;br /&gt;
    constants&lt;br /&gt;
        empty : @P* = []. % legal&lt;br /&gt;
    constructors&lt;br /&gt;
        new  : (@P Init).  % legal&lt;br /&gt;
    predicates&lt;br /&gt;
        p : (@P X). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Generic Implmentations ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic implementations have a list of type parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
    implement &amp;lt;ClassName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic class declares a class with a generic constructor.  The type of the constructed object will be inferred from the usage of the constructor.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameters must be the same as in the corresponding class declaration and have same order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@A} : aaa{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&lt;br /&gt;
&lt;br /&gt;
implement xxx{@B} % error: The parameter &amp;#039;@B&amp;#039; is not the same as in the declaration &amp;#039;@A&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In class implementations scope parameter can be used in constructors, domains, constants and in object entities (i.e. object facts, object predicates and object properties).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement xxx{@P}&lt;br /&gt;
    domains&lt;br /&gt;
        list = @P*. % legal&lt;br /&gt;
    constants&lt;br /&gt;
        empty : @P* = []. % legal&lt;br /&gt;
    constructors&lt;br /&gt;
        new  : (@P Init).  % legal&lt;br /&gt;
    predicates&lt;br /&gt;
        op : (@P X). % legal&lt;br /&gt;
    class predicates&lt;br /&gt;
        cp : (@P X). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
    facts&lt;br /&gt;
        ofct : (@P). % legal&lt;br /&gt;
    class facts&lt;br /&gt;
        cfct : (@P). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2261</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2261"/>
		<updated>2010-03-23T14:02:31Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Extensions and improvements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
=== Language ===&lt;br /&gt;
&lt;br /&gt;
* {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}&lt;br /&gt;
** Conversion to generic type&lt;br /&gt;
* {{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
* New operator == (must-unify)&lt;br /&gt;
* Universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
* Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* Native interfaces support (attributes):&lt;br /&gt;
** {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
** {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
** {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
* Other new attributes {{lang2|Attributes|retired|retired}}, {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}{{lang2|Attributes|used|used}}&lt;br /&gt;
* External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
** They cannot have clauses&lt;br /&gt;
** explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
==== New warnings ====&lt;br /&gt;
&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== IDE ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Project tree&amp;#039;&amp;#039;&amp;#039; is redesigned and reimplemented&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows is moved to preview pane of project window&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved (automatically jump to the 1st occurrence of search entity on locate, save the last dialog position, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved (one result window, F8 for next, mixed case sensitive search mode, state is saved, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved (it’s possible to put forms, etc. in a namespace)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is strongly improved for typing speed and convenience of work&lt;br /&gt;
* Improved &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog, use ALT button for filtering [ReadOnly] windows and Del for closing windows&lt;br /&gt;
* Simplify &amp;#039;&amp;#039;&amp;#039;project creation&amp;#039;&amp;#039;&amp;#039;: Project Kinds (Console application, GUI application and DLL) instead of UI Strategy and Target Type&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dump view&amp;#039;&amp;#039;&amp;#039; improvements (Shift+F2)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sorting&amp;#039;&amp;#039;&amp;#039; feature in Errors Window, Break points Window, etc&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Debugger ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== PFC ===&lt;br /&gt;
&lt;br /&gt;
==== New entities ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Collection library&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
==== Extensions and improvements ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore #requires directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2260</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2260"/>
		<updated>2010-03-23T14:01:52Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* New warnings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
=== Language ===&lt;br /&gt;
&lt;br /&gt;
* {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}&lt;br /&gt;
** Conversion to generic type&lt;br /&gt;
* {{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
* New operator == (must-unify)&lt;br /&gt;
* Universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
* Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* Native interfaces support (attributes):&lt;br /&gt;
** {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
** {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
** {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
* Other new attributes {{lang2|Attributes|retired|retired}}, {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}{{lang2|Attributes|used|used}}&lt;br /&gt;
* External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
** They cannot have clauses&lt;br /&gt;
** explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
==== New warnings ====&lt;br /&gt;
&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== IDE ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Project tree&amp;#039;&amp;#039;&amp;#039; is redesigned and reimplemented&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows is moved to preview pane of project window&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved (automatically jump to the 1st occurrence of search entity on locate, save the last dialog position, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved (one result window, F8 for next, mixed case sensitive search mode, state is saved, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved (it’s possible to put forms, etc. in a namespace)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is strongly improved for typing speed and convenience of work&lt;br /&gt;
* Improved &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog, use ALT button for filtering [ReadOnly] windows and Del for closing windows&lt;br /&gt;
* Simplify &amp;#039;&amp;#039;&amp;#039;project creation&amp;#039;&amp;#039;&amp;#039;: Project Kinds (Console application, GUI application and DLL) instead of UI Strategy and Target Type&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dump view&amp;#039;&amp;#039;&amp;#039; improvements (Shift+F2)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sorting&amp;#039;&amp;#039;&amp;#039; feature in Errors Window, Break points Window, etc&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Debugger ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== PFC ===&lt;br /&gt;
&lt;br /&gt;
==== New entities ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Collection library&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
==== Extensions and improvements ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore #requires directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2259</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2259"/>
		<updated>2010-03-23T14:01:22Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* New warnings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
=== Language ===&lt;br /&gt;
&lt;br /&gt;
* {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}&lt;br /&gt;
** Conversion to generic type&lt;br /&gt;
* {{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
* New operator == (must-unify)&lt;br /&gt;
* Universal term type &amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
* Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* Native interfaces support (attributes):&lt;br /&gt;
** {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
** {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
** {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
* Other new attributes {{lang2|Attributes|retired|retired}}, {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}{{lang2|Attributes|used|used}}&lt;br /&gt;
* External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
** They cannot have clauses&lt;br /&gt;
** explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
==== New warnings ====&lt;br /&gt;
&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;vp/&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== IDE ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Project tree&amp;#039;&amp;#039;&amp;#039; is redesigned and reimplemented&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows is moved to preview pane of project window&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved (automatically jump to the 1st occurrence of search entity on locate, save the last dialog position, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved (one result window, F8 for next, mixed case sensitive search mode, state is saved, etc.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved (it’s possible to put forms, etc. in a namespace)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is strongly improved for typing speed and convenience of work&lt;br /&gt;
* Improved &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog, use ALT button for filtering [ReadOnly] windows and Del for closing windows&lt;br /&gt;
* Simplify &amp;#039;&amp;#039;&amp;#039;project creation&amp;#039;&amp;#039;&amp;#039;: Project Kinds (Console application, GUI application and DLL) instead of UI Strategy and Target Type&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dump view&amp;#039;&amp;#039;&amp;#039; improvements (Shift+F2)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sorting&amp;#039;&amp;#039;&amp;#039; feature in Errors Window, Break points Window, etc&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Debugger ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== PFC ===&lt;br /&gt;
&lt;br /&gt;
==== New entities ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Collection library&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
==== Extensions and improvements ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore #requires directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_Upgrade_Notes&amp;diff=1373</id>
		<title>Visual Prolog 7.2 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_Upgrade_Notes&amp;diff=1373"/>
		<updated>2008-10-21T07:15:15Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Upgrading Projects from Visual Prolog 7.1 to Visual Prolog 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Upgrading Projects from Visual Prolog 7.1 to Visual Prolog 7.2==&lt;br /&gt;
# By default, the installation of Visual Prolog 7.2 will not replace any previously installed versions.&amp;lt;br /&amp;gt;The new version will be installed by default to &amp;lt;span class=&amp;quot;file&amp;quot;&amp;gt;C:\Program Files\Visual Prolog 7.2&amp;lt;/span&amp;gt;.&amp;lt;br /&amp;gt; You can remove the previous version at any time you want or continue working with both.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# Visual Prolog 7.2 projects are backward-compatible with Visual Prolog 7.1 projects. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 projects. &amp;lt;br /&amp;gt;Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# After you open your project in Visual prolog 7.2 IDE, the IDE will automatically perform necessary updates.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;After this, it is recommended you rebuild the project with the help of the &amp;lt;span class=&amp;quot;menu-item&amp;quot;&amp;gt;Build | Rebuild All command&amp;lt;/span&amp;gt; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.2==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.2 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&amp;lt;br /&amp;gt;&lt;br /&gt;
# If you are going to use Visual Prolog 7.2 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;span class=&amp;quot;vp-minorkeyword&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;properties, try, catch, finally, elseif.&amp;#039;&amp;#039;&amp;#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.0:&amp;#039;&amp;#039;&amp;#039; &amp;lt;span class=&amp;quot;vp-minorkeyword&amp;quot;&amp;gt;then&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;vp-minorkeyword&amp;quot;&amp;gt;else&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;&amp;lt;span class=&amp;quot;vp-minorkeyword&amp;quot;&amp;gt;foreach&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;lt;span class=&amp;quot;vp-minorkeyword&amp;quot;&amp;gt;do&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&amp;lt;br /&amp;gt;&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&amp;lt;br /&amp;gt;&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&amp;lt;br /&amp;gt;&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&amp;lt;br /&amp;gt;&lt;br /&gt;
# Predicates &amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;div&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;mod&amp;lt;/span&amp;gt; have changed their sense.In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt; &lt;br /&gt;
-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&lt;br /&gt;
&amp;lt;/vip&amp;gt; &lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&amp;lt;vip&amp;gt;  &lt;br /&gt;
-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&lt;br /&gt;
&amp;lt;/vip&amp;gt; &lt;br /&gt;
So, each file that contains &amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;div&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;mod&amp;lt;/span&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly.The simplest solution is to replace: div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; remfor ALL source files.&lt;br /&gt;
## The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;resolve&amp;lt;/span&amp;gt;/&amp;lt;span class=&amp;quot;code-span&amp;quot;&amp;gt;delegate&amp;lt;/span&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2:: predicateName//N =&amp;gt; predicateName/N-&amp;gt;This might cause error messages while building your project in the latest version of Visual Prolog.&amp;lt;br /&amp;gt; Fix these errors to develop you project in the current version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 5.x==&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1340</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1340"/>
		<updated>2008-10-20T11:27:01Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* vipBuilder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; instead of &amp;lt;vp&amp;gt;core::integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;core::unsigned64&amp;lt;/vp&amp;gt;. So now (as example) file positions are &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt;. The same is the case with &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;timeIntervalValue&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into namespaces (like &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So, now it is possible (for example) to have a class called &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in the namespace &amp;lt;vp&amp;gt;documentManager&amp;lt;/vp&amp;gt; even though there is also a class named &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in PFC. It is planned in a future version of Visual Prolog to put PFC classes in namespaces &amp;lt;vp&amp;gt;pfc&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;pfc\vip5x&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;pfc\gui&amp;lt;/vp&amp;gt;. Also there are new &amp;lt;vp&amp;gt;pie&amp;lt;/vp&amp;gt; packages (described below) in the namespace &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;binaryNonAtomic&amp;lt;/vp&amp;gt; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;lt;vp&amp;gt;binary&amp;lt;/vp&amp;gt; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;lt;vp&amp;gt;real32&amp;lt;/vp&amp;gt; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;handle&amp;lt;/vp&amp;gt; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;lt;vp&amp;gt;nullHandle&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;invalidHandle&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;OptionsDirective&amp;gt;:&lt;br /&gt;
    #options &amp;lt;StringLiteral&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
       &lt;br /&gt;
If &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number, the &amp;lt;vp&amp;gt;tryConvert&amp;lt;/vp&amp;gt; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;string8&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt; are not sub-types of type &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to windows starting with the letters you have pressed. Also Ctrl-Del closes the open window.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;postAction&amp;lt;/vp&amp;gt; on the &amp;lt;vp&amp;gt;window&amp;lt;/vp&amp;gt; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;lt;vp&amp;gt;popupWindow&amp;lt;/vp&amp;gt; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;getFactChainLength_nd&amp;lt;/vp&amp;gt; (in the &amp;lt;vp&amp;gt;profileMemory&amp;lt;/vp&amp;gt; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== vipBuilder ===&lt;br /&gt;
&lt;br /&gt;
Some extra options has been added to &amp;#039;&amp;#039;&amp;#039;vipBuilder&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
    /genresource - also generate resourceIdentifiers.i&lt;br /&gt;
    /compile &amp;lt;file_name&amp;gt; - compile the file &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== coverageAnalysis ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;coverage analysis&amp;#039;&amp;#039;&amp;#039; gives information about which predicates that have been called during execution of the program. The coverage analysis program reads the &amp;#039;.deb&amp;#039; files to get information about the set of classes and predicates in the program and the coverage files to get information about which predicates that have been called during execution of the program. The program must be compiled with options &amp;#039;&amp;#039;&amp;#039;/profile:min&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/debug:full&amp;#039;&amp;#039;&amp;#039; to use this new tool.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1336</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1336"/>
		<updated>2008-10-20T07:20:47Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Window Navigation Dialog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; instead of &amp;lt;vp&amp;gt;core::integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;core::unsigned64&amp;lt;/vp&amp;gt;. So now (as example) file positions are &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt;. The same is the case with &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;timeIntervalValue&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into namespaces (like &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in the namespace &amp;lt;vp&amp;gt;documentManager&amp;lt;/vp&amp;gt; even though there is also a class named &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;lt;vp&amp;gt;pfc&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;pfc\vip5x&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;pfc\gui&amp;lt;/vp&amp;gt;. Also the new &amp;lt;vp&amp;gt;pie&amp;lt;/vp&amp;gt; packages (described below) are in the name space &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;binaryNonAtomic&amp;lt;/vp&amp;gt; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;lt;vp&amp;gt;binary&amp;lt;/vp&amp;gt; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;lt;vp&amp;gt;real32&amp;lt;/vp&amp;gt; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;handle&amp;lt;/vp&amp;gt; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;lt;vp&amp;gt;nullHandle&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;invalidHandle&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;OptionsDirective&amp;gt;:&lt;br /&gt;
    #options &amp;lt;StringLiteral&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
       &lt;br /&gt;
If &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number, the &amp;lt;vp&amp;gt;tryConvert&amp;lt;/vp&amp;gt; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;string8&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt; are not sub-types of type &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to windows starting with the letters you have pressed. Also Ctrl-Del closes the open window.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;postAction&amp;lt;/vp&amp;gt; on the &amp;lt;vp&amp;gt;window&amp;lt;/vp&amp;gt; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;lt;vp&amp;gt;popupWindow&amp;lt;/vp&amp;gt; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;getFactChainLength_nd&amp;lt;/vp&amp;gt; (in the &amp;lt;vp&amp;gt;profileMemory&amp;lt;/vp&amp;gt; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== vipBuilder ===&lt;br /&gt;
&lt;br /&gt;
Some extra options has been added to &amp;#039;&amp;#039;&amp;#039;vipBuilder&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
    /genresource - also generate resourceIdentifiers.i&lt;br /&gt;
    /compile &amp;lt;file_name&amp;gt; - compile the file &amp;lt;file_name&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1335</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1335"/>
		<updated>2008-10-20T07:19:26Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: /* Window Navigation Dialog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;lt;vp&amp;gt;integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt; instead of &amp;lt;vp&amp;gt;core::integer64&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;core::unsigned64&amp;lt;/vp&amp;gt;. So now (as example) file positions are &amp;lt;vp&amp;gt;unsigned64&amp;lt;/vp&amp;gt;. The same is the case with &amp;lt;vp&amp;gt;gmtTimeValue&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;localTimeValue&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;timeIntervalValue&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into namespaces (like &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in the namespace &amp;lt;vp&amp;gt;documentManager&amp;lt;/vp&amp;gt; even though there is also a class named &amp;lt;vp&amp;gt;file&amp;lt;/vp&amp;gt; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;lt;vp&amp;gt;pfc&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;pfc\vip5x&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;pfc\gui&amp;lt;/vp&amp;gt;. Also the new &amp;lt;vp&amp;gt;pie&amp;lt;/vp&amp;gt; packages (described below) are in the name space &amp;lt;vp&amp;gt;pfc\pie&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;binaryNonAtomic&amp;lt;/vp&amp;gt; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;lt;vp&amp;gt;binary&amp;lt;/vp&amp;gt; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;lt;vp&amp;gt;real32&amp;lt;/vp&amp;gt; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;lt;vp&amp;gt;handle&amp;lt;/vp&amp;gt; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;lt;vp&amp;gt;nullHandle&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;invalidHandle&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;lt;vp&amp;gt;#options&amp;lt;/vp&amp;gt; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;OptionsDirective&amp;gt;:&lt;br /&gt;
    #options &amp;lt;StringLiteral&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;lt;vp&amp;gt;qqq&amp;lt;/vp&amp;gt; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
       &lt;br /&gt;
If &amp;lt;vp&amp;gt;X - 23&amp;lt;/vp&amp;gt; gives a negative number, the &amp;lt;vp&amp;gt;tryConvert&amp;lt;/vp&amp;gt; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;string8&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt; are not sub-types of type &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to windows starting with the letters you have pressed. Also Del button closes the open window.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;postAction&amp;lt;/vp&amp;gt; on the &amp;lt;vp&amp;gt;window&amp;lt;/vp&amp;gt; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;lt;vp&amp;gt;popupWindow&amp;lt;/vp&amp;gt; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;lt;vp&amp;gt;object&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;symbol&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;lt;vp&amp;gt;getFactChainLength_nd&amp;lt;/vp&amp;gt; (in the &amp;lt;vp&amp;gt;profileMemory&amp;lt;/vp&amp;gt; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== vipBuilder ===&lt;br /&gt;
&lt;br /&gt;
Some extra options has been added to &amp;#039;&amp;#039;&amp;#039;vipBuilder&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
    /genresource - also generate resourceIdentifiers.i&lt;br /&gt;
    /compile &amp;lt;file_name&amp;gt; - compile the file &amp;lt;file_name&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Namespaces&amp;diff=1326</id>
		<title>Language Reference/Namespaces</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Namespaces&amp;diff=1326"/>
		<updated>2008-10-18T10:01:06Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|Namespaces}}&lt;br /&gt;
&lt;br /&gt;
Namespaces can be used to avoid name clashes, without having to use long strange names. The names in two different namespaces will never clash, but it may be necessary to qualify references with the namespace (or part of it) to resolve ambiguities.&lt;br /&gt;
&lt;br /&gt;
A namespaces are declared and defined implicitly using &amp;lt;vpbnf&amp;gt;&amp;lt;NamespaceEntrance&amp;gt;&amp;lt;/vpbnf&amp;gt;&amp;#039;es:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;NamespaceEntrance&amp;gt;:&lt;br /&gt;
   namespace &amp;lt;NamespaceIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;NamespaceIdentifier&amp;gt;: one of&lt;br /&gt;
   &amp;lt;LowercaseIdentifier&amp;gt;&lt;br /&gt;
   &amp;lt;LowercaseIdentifier&amp;gt; \ &amp;lt;NamespaceIdentifier&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In short a &amp;lt;vpbnf&amp;gt;&amp;lt;NamespaceIdentifier&amp;gt;&amp;lt;/vpbnf&amp;gt; is a sequence of lowercase identifiers separated by backslashes.&lt;br /&gt;
&lt;br /&gt;
=== Namespace Entrances and Regions ===&lt;br /&gt;
&lt;br /&gt;
Namespace entrances divide source files into &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;namespace regions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
A namespace entrance marks the beginning of a namespace region, which ends at the next namespace entrance or the end of the file.&lt;br /&gt;
&lt;br /&gt;
Every file starts in the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;root namespace&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Namespace regions are not influenced by &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt; directives, meaning:&lt;br /&gt;
* Namespace entrances in an &amp;lt;vp&amp;gt;#include&amp;lt;/vp&amp;gt;-file does not change the namespace region in the including file&lt;br /&gt;
* Any file starts in the root namespace (also if it is included inside a namespace region in another file).&lt;br /&gt;
&lt;br /&gt;
Any interface, class and implementation that is meet inside a namespace region belongs to that namespace.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class aaa&lt;br /&gt;
end class aaa&lt;br /&gt;
&lt;br /&gt;
namespace xxx&lt;br /&gt;
&lt;br /&gt;
class bbb&lt;br /&gt;
end class bbb&lt;br /&gt;
&lt;br /&gt;
namespace xxx\yyy&lt;br /&gt;
&lt;br /&gt;
class ccc&lt;br /&gt;
end class ccc&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file is divided in three regions (assuming that it is a complete file). The first region is in the root namespace (\), the second region belongs to the &amp;lt;vp&amp;gt;xxx&amp;lt;/vp&amp;gt; namespace and the third region belongs to the &amp;lt;vp&amp;gt;xxx\yyy&amp;lt;/vp&amp;gt; namespace.&lt;br /&gt;
&lt;br /&gt;
Subsequently, the class &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt; belongs to the root namespace, the class &amp;lt;vp&amp;gt;bbb&amp;lt;/vp&amp;gt; belongs to the namespace &amp;lt;vp&amp;gt;xxx&amp;lt;/vp&amp;gt; and finally the class &amp;lt;vp&amp;gt;ccc&amp;lt;/vp&amp;gt; belongs to the namespace &amp;lt;vp&amp;gt;xxx\yyy&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Referencing names in namespaces ===&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;vp&amp;gt;ccc&amp;lt;/vp&amp;gt; is a class in the namespace &amp;lt;vp&amp;gt;xxx\yyy&amp;lt;/vp&amp;gt;, then the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;full name&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; of &amp;lt;vp&amp;gt;ccc&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;\xxx\yyy\ccc&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The leading backslash indicates that we start from the root namespace.&lt;br /&gt;
&lt;br /&gt;
A class/interface can always be uniquely referenced using its full name.&lt;br /&gt;
&lt;br /&gt;
==== Open namespaces ====&lt;br /&gt;
&lt;br /&gt;
The full names are not always convenient and therefore it is possible to use shorter names by opening namespaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ScopeQualification&amp;gt;: one of&lt;br /&gt;
    &amp;lt;OpenQualification&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OpenQualification&amp;gt;: one of&lt;br /&gt;
    open &amp;lt;NamespaceIdentifier&amp;gt; \&lt;br /&gt;
    ...&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Opening a namespace is distinguished from opening a class/interface by a trailing backslash.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class aaa&lt;br /&gt;
    open xxx\yyy\&lt;br /&gt;
...&lt;br /&gt;
end class aaa&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The namespace &amp;lt;vp&amp;gt;xxx\yyy&amp;lt;/vp&amp;gt; is opened inside &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When a namespace is open that part of a full name can be left out.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; A domains with the full name &amp;lt;vp&amp;gt;\xxx\yyy\zzz\ccc::ddd&amp;lt;/vp&amp;gt; can be as referenced &amp;lt;vp&amp;gt;zzz\ccc::ddd&amp;lt;/vp&amp;gt; inside &amp;lt;vp&amp;gt;aaa&amp;lt;/vp&amp;gt; because &amp;lt;vp&amp;gt;xxx\yyy&amp;lt;/vp&amp;gt; is open.&lt;br /&gt;
&lt;br /&gt;
Notice that the short name does not start with a backslash; A name starting with a backslash is always a full name.&lt;br /&gt;
&lt;br /&gt;
The namespace that a certain scope (i.e. interface/class/implementation) belongs to is (implicitly) open inside that scope.&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1325</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1325"/>
		<updated>2008-10-18T09:51:40Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
Dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO, or /* TODO */) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO &lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== vipBuilder ===&lt;br /&gt;
&lt;br /&gt;
Some extra options has been added to &amp;#039;&amp;#039;&amp;#039;vipBuilder&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
    /genresource - also generate resourceIdentifiers.i&lt;br /&gt;
    /compile &amp;lt;file_name&amp;gt; - compile the file &amp;lt;file_name&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1324</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1324"/>
		<updated>2008-10-18T09:51:01Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
Dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO, or /* TODO */) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO &lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== vipBuilder ===&lt;br /&gt;
&lt;br /&gt;
Some extra options has been added to &amp;#039;&amp;#039;&amp;#039;vipBuilder&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
    /genresource - also generate resourceIdentifiers.i&lt;br /&gt;
    /compile &amp;lt;file_name&amp;gt; -  compile the file &amp;lt;file_name&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1320</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1320"/>
		<updated>2008-10-18T09:41:03Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
Dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; (i.e. the comments like % TODO, or /* TODO */) in source files which can be rather convenient for developers. This feature is available via the Main menu: View | TODO &lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5xChainDB8 ===&lt;br /&gt;
&lt;br /&gt;
This package is introduced for compatibility support in order to handle old external databases (where strings are not in Unicode).&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1319</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1319"/>
		<updated>2008-10-18T09:38:26Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
Dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file as well.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
=== TODO Window ===&lt;br /&gt;
&lt;br /&gt;
It is now possible to view all the &amp;#039;&amp;#039;&amp;#039;TODO comments&amp;#039;&amp;#039;&amp;#039; in source files (i.e. the comments like % TODO, or /* TODO */) which can be rather convenient for developers. This feature is available via the Main menu: View | TODO &lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1318</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1318"/>
		<updated>2008-10-18T09:33:46Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
Dialog &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; has been improved such that it now shows total number of found entries in a file.&lt;br /&gt;
&lt;br /&gt;
=== Welcome Page ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Welcome Page&amp;#039;&amp;#039;&amp;#039; has been improved such that now it has an extra context menu which can be accessed via right mouse. This menu allows to inspect project file properties, remove project from the list of projects, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1317</id>
		<title>Visual Prolog 7.2 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.2_New_Features&amp;diff=1317"/>
		<updated>2008-10-18T09:29:33Z</updated>

		<summary type="html">&lt;p&gt;Alexander Doronin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Prolog 7.2 introduces many new features and improvements.&lt;br /&gt;
Following are the most significant changes.&lt;br /&gt;
&lt;br /&gt;
== Language Features ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog 7.2 brings several language improvements. This section gives a brief overview of some of them.&lt;br /&gt;
&lt;br /&gt;
=== Anonymous predicates ===&lt;br /&gt;
&lt;br /&gt;
Anonymous predicates are the Prolog counterparts to anonymous functions as known in functional programming languages. Anonymous predicates are described in details in the article &amp;#039;&amp;#039;[http://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates Anonymous Predicates]&amp;#039;&amp;#039; of Visual Prolog Language Reference.&lt;br /&gt;
&lt;br /&gt;
=== 64 bit numbers ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; are two new built-in types, that replace the PFC domains &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. The new domains are like integer and unsigned expect that they have a 64-bit representation. All arithmetic operations (except the power operation) are supported for the types. They are written, read, saved and consulted in normal number format only with much larger range than 32-bit numbers. PFC has been updated to use &amp;#039;&amp;#039;&amp;#039;integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039; instead of &amp;#039;&amp;#039;&amp;#039;core::integer64&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;core::unsigned64&amp;#039;&amp;#039;&amp;#039;. So now (as example) file positions are &amp;#039;&amp;#039;&amp;#039;unsigned64&amp;#039;&amp;#039;&amp;#039;. The same is the case with &amp;#039;&amp;#039;&amp;#039;gmtTimeValue&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;localTimeValue&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;timeIntervalValue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
Interfaces and classes can be put into name-spaces (like &amp;#039;&amp;#039;&amp;#039;pfc\pie&amp;#039;&amp;#039;&amp;#039;). This allows the same interface/class name to be declared/defined in several name spaces in the same program. So now it is possible (as example) to have a class called &amp;#039;&amp;#039;&amp;#039;file &amp;#039;&amp;#039;&amp;#039; in the namespace &amp;#039;&amp;#039;&amp;#039;documentManager&amp;#039;&amp;#039;&amp;#039; even though there is also a class named &amp;#039;&amp;#039;&amp;#039;file&amp;#039;&amp;#039;&amp;#039; in PFC. It is planned (but not effectuated at the time of writing) to put PFC classes in namespaces &amp;#039;&amp;#039;&amp;#039;pfc&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;pfc\vip5x &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; pfc\gui&amp;#039;&amp;#039;&amp;#039;. Also the new &amp;#039;&amp;#039;&amp;#039;pie&amp;#039;&amp;#039;&amp;#039; packages (described below) are in the name space &amp;#039;&amp;#039;&amp;#039; pfc\pie&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== binaryNonAtomic domain ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;binaryNonAtomic&amp;#039;&amp;#039;&amp;#039; is introduced to distinguish binaries may contain pointers and should therefore be scanned by the garbage collector. The ordinary &amp;#039;&amp;#039;&amp;#039;binary&amp;#039;&amp;#039;&amp;#039; domain is no longer scanned for pointers.&lt;br /&gt;
&lt;br /&gt;
=== real32 ===&lt;br /&gt;
&lt;br /&gt;
A domain &amp;#039;&amp;#039;&amp;#039;real32&amp;#039;&amp;#039;&amp;#039; is introduced to ease the integration with foreign API&amp;#039;s that sometimes uses such short reals. It is not intended for use in &amp;quot;normal&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
=== handle ===&lt;br /&gt;
&lt;br /&gt;
A new built-in domain &amp;#039;&amp;#039;&amp;#039;handle&amp;#039;&amp;#039;&amp;#039; which corresponds to API handle type is introduced to ease the integration with foreign API&amp;#039;s as well. Also, there are two new built-in constants of this type: &amp;#039;&amp;#039;&amp;#039;nullHandle&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;invalidHandle&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Compiler directive #options ===&lt;br /&gt;
&lt;br /&gt;
A new compiler directive &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; is introduced to define some additional compiler options for a separate compilation init. It has the following syntax:&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;#options&amp;#039;&amp;#039;&amp;#039; &amp;lt;string_literal&amp;gt;&lt;br /&gt;
This directive affects the whole compilation unit and should be used outside scopes and conditional compilation statements in the main source file for a compilation unit (i.e. in the source file which is passed to the compiler). Otherwise the compiler generates warning message and ignores the directive. The &amp;#039;&amp;#039;&amp;#039;&amp;lt;string_literal&amp;gt;&amp;#039;&amp;#039;&amp;#039; can only contain the following compiler&amp;#039;s options: &amp;#039;&amp;#039;&amp;#039;/Warning&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Check&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/NOCheck&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/Optimize&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/DEBug&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/GOAL&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;/MAXErrors&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;/MAXWarnings&amp;#039;&amp;#039;&amp;#039;. Otherwise the compiler generates error message for invalid option.&lt;br /&gt;
&lt;br /&gt;
== Compiler ==&lt;br /&gt;
&lt;br /&gt;
The compiler is (obviously) updated to deal with the new language features. But it has also been improved in several other respects.&lt;br /&gt;
&lt;br /&gt;
=== Unreachable code detection ===&lt;br /&gt;
&lt;br /&gt;
The ability to detect unreachable code has been improved vastly, both when it comes to detecting unused predicates and facts and when it comes to code inside clauses which cannot be reached. Unreachable code will cause warnings.&lt;br /&gt;
&lt;br /&gt;
=== Superfluous test detection ===&lt;br /&gt;
&lt;br /&gt;
The compiler will also give warnings about tests, which are trivially fulfilled due to the type of the involved variables. Consider this code for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
     ppp(X) :- &lt;br /&gt;
         Y = X - 23, &lt;br /&gt;
         Y &amp;gt;= 0,  &lt;br /&gt;
        qqq(Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; is declared like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
predicates&lt;br /&gt;
      qqq : (positive V). &amp;lt;/vip&amp;gt;&lt;br /&gt;
The code above might seem reasonable, we only want to call &amp;#039;&amp;#039;&amp;#039;qqq&amp;#039;&amp;#039;&amp;#039; if Y is indeed greater than or equal to zero.&lt;br /&gt;
&lt;br /&gt;
The only problem is Y is always greater than zero, because Y has the type positive, which only contains numbers that are greater than or equal to zero. &lt;br /&gt;
&lt;br /&gt;
If the calculation X - 23 gives a negative number an out-of-range exception will be raised (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; reaching the test). &lt;br /&gt;
So this new warning can help the programmer detect places where it seems that testing ensures validity of the code, while in reality the test will never fail because an exception will be raised instead. The code above can be corrected using this code: &lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
   ppp(X) :-&lt;br /&gt;
       Y = tryConvert(positive, X - 23),&lt;br /&gt;
       qqq(Y). &lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
If X  -  23 gives a negative number, the &amp;#039;&amp;#039;&amp;#039;tryConvert&amp;#039;&amp;#039;&amp;#039; will fail.&lt;br /&gt;
&lt;br /&gt;
=== Smaller code ===&lt;br /&gt;
&lt;br /&gt;
The size of the generated code has become smaller, especially for predicates with many clauses that match different patterns of input.&lt;br /&gt;
&lt;br /&gt;
=== Less stack usage ===&lt;br /&gt;
&lt;br /&gt;
Likewise, the stack size has been reduced (dramatically in some cases).&lt;br /&gt;
&lt;br /&gt;
=== The sub-type relations for some built-in types were changed ===&lt;br /&gt;
&lt;br /&gt;
The built-in types &amp;#039;&amp;#039;&amp;#039;string&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;string8&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039; are not sub-types of type &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; any more.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions for delegate- sections order were removed ===&lt;br /&gt;
&lt;br /&gt;
Now &amp;#039;&amp;#039;&amp;#039;delegate&amp;#039;&amp;#039;&amp;#039;- sections can be mixed with &amp;quot;usual&amp;quot; sections  (like predicates, etc.) inside a class implementation.&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
Many bugs and inconveniences have been solved in the IDE. Just like numerous smaller and larger improvements has been made. This section describes some of the major improvements.&lt;br /&gt;
&lt;br /&gt;
=== Build speed ===&lt;br /&gt;
&lt;br /&gt;
The build system has been changed such that it can utilize multi-core processors by compiling several packages in parallel. On a quad-core processor this typically gives a factor 4 (sometimes more) when many packages needs to be compiled.&lt;br /&gt;
&lt;br /&gt;
As of this writing, we are also working on letting the compiler itself compile several packages in a single invocation and thus skip many compiler phases for files that are included in several packages.&lt;br /&gt;
&lt;br /&gt;
This feature has given a factor 4 when rebuilding a &amp;#039;&amp;#039;very&amp;#039;&amp;#039; large project.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSence ===&lt;br /&gt;
&lt;br /&gt;
Browse information (i.e. information about the source code fed from the compiler back to the IDE) is now utilized to provide IntelliSense: When you edit source code the IDE shows possible/sensible completion of the word you are typing. You can then select the completion in the list using mouse, arrow keys and TAB; the IDE will complete the word with your choice. The IDE will also show tool tip windows showing the declaration of the predicate you are about to write arguments for. That way you can see which arguments the predicate takes without changing context.&lt;br /&gt;
&lt;br /&gt;
=== Window Navigation Dialog ===&lt;br /&gt;
&lt;br /&gt;
The order, in which Ctrl-TAB shifts between IDE windows, has been changed to visit most-recently-visited windows first.&lt;br /&gt;
&lt;br /&gt;
Furthermore, Ctrl-TAB also brings up a navigation dialog listing all the open windows. The dialog stays up as long as Ctrl-key is pressed. In this dialog you can see the windows in the order they will be shifted to, but you can also choose a window directly using the mouse or the arrow keys. If you press letters the list will be filtered to&lt;br /&gt;
&lt;br /&gt;
windows starting with the letters you have pressed.&lt;br /&gt;
&lt;br /&gt;
=== Grouping editor windows ===&lt;br /&gt;
&lt;br /&gt;
Editor windows can be grouped together to look and behave like a single window. This has the advantage that you can arrange windows in a fixed layout inside the IDE. The IDE will remember two different layouts, one for &amp;quot;normal&amp;quot; mode and one for debug mode. Typically, you want large editor windows in &amp;quot;normal&amp;quot; mode, but smaller editors in debug mode to give more room for the variables window, etc.&lt;br /&gt;
&lt;br /&gt;
=== Resources view in project tree ===&lt;br /&gt;
&lt;br /&gt;
When selecting a resource (e.g. a dialog or a bitmap) in the project tree, the right pane will show a preview of the resource.&lt;br /&gt;
&lt;br /&gt;
=== Zooming ===&lt;br /&gt;
&lt;br /&gt;
Pressing the Ctrl and using the mouse wheel the IDE will increase/decrease font size in various windows creating a zoom effect. Zooming is also bound to Ctrl-+, Ctrl--, and Ctrl-0 reset to 100%.&lt;br /&gt;
&lt;br /&gt;
=== Un-/commenting blocks ===&lt;br /&gt;
&lt;br /&gt;
The editor has new commands for commenting and un-commenting a block of code with %-chars. The commands are bound to Ctrl-Alt-% and Ctrl-Alt-Shift-%. (It would be more correct to state the keys as Ctrl-Alt-5 and Ctrl-Alt-Shift-5, but it seems simpler to remember the %-key).&lt;br /&gt;
&lt;br /&gt;
=== Project loading speed ===&lt;br /&gt;
&lt;br /&gt;
The project loading has been changed such that the speed of this process was increased.&lt;br /&gt;
&lt;br /&gt;
=== Find In Files dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog has been improved such that it now shows the total number of found entries in a file.&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
PFC has mainly been consolidated, updated to 64-bit numbers and things like that. But there are also some new things.&lt;br /&gt;
&lt;br /&gt;
=== PIE ===&lt;br /&gt;
&lt;br /&gt;
The engine of PIE (Prolog Interpreter Engine) is now added to PFC and will therefore be supported as a tool in future. The most important feature is that you can easily hook-in predicates from you own application. Subsequently, the PIE programs can manipulate your application. So PIE is very useful as a scripting engine in applications. Besides this, the efficiency has been improved and PIE now supports functions and real numbers.&lt;br /&gt;
&lt;br /&gt;
=== progressBarControl ===&lt;br /&gt;
&lt;br /&gt;
A progressBarControl binds to the win32 common control progress bar. It is the intension to add additional win32 common controls, but to deal more easily with them certain inner parts of PFC GUI will have to be revised first.&lt;br /&gt;
&lt;br /&gt;
=== postAction ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;postAction&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;window&amp;#039;&amp;#039;&amp;#039; class, makes it possible to post an action to any window. The action will be packed in a user message and when the user message is handled the action is executed. Together with anonymous predicates this makes any other use of user messages superfluous.&lt;br /&gt;
&lt;br /&gt;
=== popupWindow ===&lt;br /&gt;
&lt;br /&gt;
A new class &amp;#039;&amp;#039;&amp;#039; popupWindow&amp;#039;&amp;#039;&amp;#039; makes it easier to create popup windows like tooltips. Most importantly popup windows must have the screen as parent so that they can be drawn outside their logical owner and on top of other windows.&lt;br /&gt;
&lt;br /&gt;
=== radixTree ===&lt;br /&gt;
&lt;br /&gt;
A radix tree is a map from &amp;#039;&amp;#039;&amp;#039;pointer&amp;#039;&amp;#039;&amp;#039; to any type. Its main advantage (over for example red-black-trees) is that supports very efficient merge of several maps. The disadvantage is that the keys are pointer values, so the trees can only be used on things with unique pointers (like &amp;#039;&amp;#039;&amp;#039;object&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;symbol&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
=== uxTheme native bindings ===&lt;br /&gt;
&lt;br /&gt;
Native bindings to uxTheme make it possible to experiment with creating &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aware&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; controls. Theme aware controls are not drawn using lines, circles, rectangles, etc. Instead they are drawn using &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theme elements&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Theme elements are logical graphical entities like divider line, button surface, button outline, drop-down mark, etc. You combine/draw such logical elements into your control, and when the theme changes your control will also change appearance. If you have chosen the elements wisely your control will also blend-in with other themes.&lt;br /&gt;
&lt;br /&gt;
=== getFactChainLength_nd ===&lt;br /&gt;
&lt;br /&gt;
A new predicate &amp;#039;&amp;#039;&amp;#039;getFactChainLength_nd&amp;#039;&amp;#039;&amp;#039; (in the &amp;#039;&amp;#039;&amp;#039;profileMemory&amp;#039;&amp;#039;&amp;#039; class) returns the number of facts in each class fact chain in the entire program. It is intended to help tracking down problems with class facts that are not retracted when they should and therefore eats memory by keeping data alive that should have been dead.&lt;br /&gt;
&lt;br /&gt;
=== weakPointer ===&lt;br /&gt;
&lt;br /&gt;
Weak pointers are &amp;quot;pointers&amp;quot; that the garbage collector does not see as pointers, so if there are only weak pointers to a piece of memory the garbage collector will recycle that piece of memory. As a consequence, a weak pointer cannot always be dereferenced, sometimes the target as been recycled. Dereferencing of a weak pointer it therefore done using a &amp;#039;&amp;#039;&amp;#039;determ&amp;#039;&amp;#039;&amp;#039; predicate.&lt;br /&gt;
&lt;br /&gt;
So in short a weak pointer is a pointer that will not keep memory alive&amp;lt;font size=&amp;quot;11.0pt&amp;quot;&amp;gt;. &amp;lt;/font&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Doronin</name></author>
	</entry>
</feed>