Prolog Manager, the project is ready to work within. NOTE: A project is open if the name is displayed on the top left header Step 5 - New projects are initially set up in Prolog Manager by the PMO Team at the onset of the project. To open a project, select the desired project and then choose 'Open Project' or double click on the project name. Prolog is a configurable construction project management solution for the contractor market bringing together office and field management, collaboration, cost control and purchasing. By using Prolog to monitor and control projects, you will have the confidence that all project are performing on-time and delivered on-budget, with quality.
4.25Operators
Operators are defined to improve the readability of source code. For example, without operators, to write
2*3+4*5 one would have to write +(*(2,3),*(4,5)) . In Prolog, a number of operators have been predefined. All operators, except for the comma (,) can be redefined by the user.
Some care has to be taken before defining new operators. Defining too many operators might make your source `natural' looking, but at the same time using many operators can make it hard to understand the limits of your syntax.
Online support is available to customers with current support contracts. Should you have questions or wish to purchase or renew support, please contact our Sales Department.
In SWI-Prolog, operators are local to the module in which they are defined. Operators can be exported from modules using a term
op(Precedence, Type, Name) in the export list as specified bymodule/2. Many modern Prolog systems have module specific operators. Unfortunately, there is no established interface for exporting and importing operators. SWI-Prolog's convention has been addopted by YAP.
The module table of the module
user acts as default table for all modules and can be modified explicitly from inside a module to achieve compatibility with other Prolog that do not have module-local operators:
![]()
Although operators are module-specific and the predicates that define them (op/3) or rely on them such as current_op/3, read/1 and write/1 are module sensitive, they are not proper meta-predicates. If they were proper meta predicates read/1 and write/1 would use the module from which they are called, breaking compatibility with other Prolog systems. The following rules apply:
In SWI-Prolog, a quoted atom never acts as an operator. Note that the portable way to stop an atom acting as an operator is to enclose it in parentheses like this: (myop). See alsosection 5.3.1.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |