Language Reference/Built-in entities/Predicates

The following predicates are deprecated:

and
See and.

assert
assert : ( FactTerm).

Insert the specified fact at the end of the matched internal facts database

assert(Fact) inserts Fact in the matched internal facts database after any other stored facts for the corresponding database predicate. Fact must be a term belonging to the domain of an internal facts database. assert/1 applied to a single fact changes the existing instance of a fact to the specified one. assert/1 has the same effect as assertz/1. See also asserta/1.

Notice that the combination of retract/1 and assert/1 like the following can lead to endless loop:

loop :- retract(fct(X)), ...          % creating Y from X     assert(fct(Y)), fail.

The problem is that the retract in first line will eventually retract the fact asserted in the last line, because that fact is inserted last in the fact chain.

Exceptions:


 * Attempt to assert a second instance to a fact declared as determ.

asserta
asserta : ( FactTerm).

Insert a fact at the beginning of the matched internal facts database.

The asserta(Fact) predicate inserts a Fact</vp> in the matched internal facts database before any other stored facts for the corresponding predicate. The Fact</vp> must be a term belonging to the domain of an internal facts database. The asserta/1</vp> applied to a single fact changes the existing instance of a fact to the specified one. See also assert/1 and assertz/1.

Exceptions:


 * Attempt to a fact declared as determ, but the fact instance already exists.

assertz
assertz : (<fact-term> FactTerm).

assertz</vp> does exactly the same as the assert/1 predicate.

bound
bound : ( Variable) determ.

Test whether the specified variable is bound to a value.

The bound(Variable)</vp> succeeds if Variable</vp> is bound and fails if it is free. The bound</vp> predicate is used to control flow patterns and to check the binding of reference variables. The bound</vp> predicate treats the specified Variable</vp> as bound if any of it's part is instantiated.

See also free/1.

class_name
class_Name : -> string ClassName.

This compile time predicate returns the string ClassName</vp> that represents the name of the current interface or class.

compare
compare : (A Left, A Right) -> compareResult CompareResult.

Comparison of two terms of the same domain, resturns the value of compareResult domain.

CompareResult</vp> = compare("bar</vp>", "foo</vp>")

convert
convert : ( Type, Term) -> Converted.

Checked term conversion.

Call-template for this function is:

ReturnTerm</vp> = convert(returnDomain, InputTerm</vp>)


 * returnDomain : Specifies a domain to which function convert/2-></vp> converts <vp>InputTerm</vp>. Here returnDomain 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 returnDomain must be specified at compile-time, i.e. it cannot come from a variable.


 * <InputTerm> : Specifies the value that must be converted. <vp>InputTerm</vp> may be any Prolog term or an expression. If <vp>InputTerm</vp> is an expression, then it will be evaluated before the conversion.


 * <ReturnTerm> : Returned parameter <vp>ReturnTerm</vp> will be of returnDomain type.

The <vp>convert</vp> predicate performs a clean and genuine conversion of the given <vp>InputTerm</vp>, returning a new term <vp>ReturnTerm</vp> of the specified new domain returnDomain. If <vp>convert</vp> cannot perform the required conversion, it rises errors. The similar functionality is provided by the tryConvert/2-> predicate, but <vp>tryConvert-></vp> fails and does not produce any runtime errors if it cannot perform the conversion.

Allowed conversions

 * Between numerical domains.
 * Between interface types.
 * Between string and symbol domains.
 * From binary to pointer.
 * For synonyms of mentioned domains.
 * Between reference domains and corresponding non-reference domains.

The contrast to these is uncheckedConvert/2-> predicate, which performs an unchecked conversion between terms from any domains, which have the same bit-size.

The <vp>convert/2-></vp> (or tryConvert/2->) 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:


 * ok the successful conversion to the target domain;
 * run-time-check the conversion to the target domain with generation of run-time checking for compatibility;
 * error the conversion is impossible, error output.

Rules of Checked Explicit Conversions

 * Synonyms of domains are converted using the same rules that are applied to the domains themselves.
 * Numerical domains can be converted to the numerical domains only.
 * Integral constants are the representatives of the anonymous integral domain: <vp>[const .. const]</vp>.
 * Real constants are the representatives of the anonymous real domain: <vp>digits</vp> <vp>dig [const .. const]</vp>, where <vp>dig</vp> is the number of the digits in mantissa without insignificant zeroes.
 * A value of the symbol domain can be converted to the string domain and vice versa.
 * A value of binary domain can be converted to the pointer domain.
 * The domains that are implicitly introduced for interfaces can be converted only to the interface domains according to the rules specified below.
 * All other domains cannot be converted.

Conversions of Numerical Domains

 * 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.
 * When input term in real and output is integer, then <vp>convert/2-></vp> and tryConvert/2-> predicates truncate the input value to the nearest integer value, which is nearer to zero.

Conversions of Interface Types
Predicate <vp>convert/2-></vp> 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:

interface x     supports a, b end interface x

If object is created by class, which implements <vp>x</vp> interface, and then object is passed as parameter of type <vp>a</vp> to some predicate, then it is allowed to convert the object to <vp>b</vp> type.

Exceptions:


 * Check range error.
 * Unsupported interface type.

digitsOf
digitsOf : (<real-domain> Domain) -> unsigned.

Returns precision of the specified floating-point domain.

Call-template for this function is:

Precision = digitsof(domainName)

The input parameter domainName of this compiling-time predicate is a floating-point domain, it should be explicitly specified at compile-time (that is, domainName cannot come from a variable). The predicate returns the number <Precision> that was determined by the <vp>digits</vp> attribute in the domain declaration.

The compiler guarantees that values of the domain domainName will have at least <Precision> number of significant decimal digits.

errorExit
errorExit : (unsigned ErrorNumber) erroneous.

Performs a run-time error with the specified return code <vp>ErrorNumber</vp>, which can be used in the try-catch-finally.

fact_address
fact_address : (FactType FactVariable) -> memory::pointerTo{FactType} PointerToFactVariable.

The <vp>fact_address</vp> predicate returns the address (as a <vp>memory::pointerTo{FactType}</vp>) of a fact variable <vp>FactVariable</vp> of type <vp>FactType</vp>.

<vp>FactVariable</vp> must be a fact variable.

fail
fail : failure.

The <vp>fail</vp> predicate forces failure and, hence, always causes backtracking. A clause that fails (with <vp>fail</vp> or for some other reason) cannot bind output arguments.

free
free : (<variableName> Variable) determ.

Check whether a variable is free.

Call-template for this predicate is:

free(Variable)

The <vp>free</vp> predicate succeeds if the specified <vp>Variable</vp> is free and fails if <vp>Variable</vp> is bound. The <vp>free</vp> predicate treats the specified <vp>Variable</vp> as bound if any of it's part are instantiated.

See also bound/1.

fromEllipsis
fromEllipsis : (...) -> any* AnyTermList.

This predicate creates the list of terms of the universal type <vp>any</vp> from the EllipsisBlock ... (i.e. from the special varying parameters block).

Call-template for this function is:

AnyTermList = fromEllipsis(EllipsisBlock )

See also toEllipsis/1->.

hasDomain
<vp>hasDomain</vp> is not really a predicate, but more a type declaration/restriction. It has two forms a non-function for declaring/restricting the type of a variable and a function form for declaring/restricting the type of a value.

The non-function form is called with a type as first parmeter and a variable as second parameter.

hasDomain : ( Type, Type Variable).

The only effect of the call is that the <vp>Variable</vp> will be restricted to the type <vp>Type</vp>.

The variable can be free, bound or of some mixed flow and the binding of the variable will not change in any way.

The function form is called with a type as first argument and a value as second argument, and it returns the same value.

hasDomain : ( Type, Type Value) -> Type Value.

The only effect of the call is to ensure that the <vp>Value</vp> will be restricted to the type <vp>Type</vp>.

lowerBound
lowerBound : (<numeric-domain> NumericDomain) -> <numeric-domain> LowerBound.

Returns the lower bound of the specified <vp>NumericDomain</vp>.

Call-template for this function is:

LowerBoundValue = lowerBound(domainName)

The <vp>lowerBound</vp> is a compiling-time predicate. The <vp>lowerBound</vp> returns the lower bound value <vp>LowerBoundValue</vp> of the specified numeric domain domainName. The return value <vp>LowerBoundValue</vp> belongs to the same domain domainName. The domainName parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, domainName cannot come from a variable). See also upperBound/1->.

It will give a compile time error if the specified domain domainName is not numeric domain.

in
See in/2.

isErroneous
isErroneous : (<fact-variable> FactVariable) determ.

The predicate succeeds if the specified fact variable is <vp>erroneous</vp>.

Call-template for this predicate is:

isErroneous(factVariableName)

The predicate succeeds if the specified fact variable <vp>factVariableName</vp> has the <vp>erroneous</vp> value, otherwise it fails.

See also notErroneous.

maxDigits
maxDigits : (<real-domain> RealDomain) -> unsigned MaxDigits

Retrieves the value of digits (precision) of the basic domain corresponding to the specified floating-point domain <vp>RealDomain</vp>.

Call-template for this function is:

MaxDigitsNumber = maxdigits(domainName)

The return maximal number of digits <vp>MaxDigitsNumber</vp> for the domainName parameter, which should be the name of a <vp>real</vp> domain.

not
See not.

notErroneous
The <vp>notErroneous/1-></vp> predicate will succeed with the value of a fact if the fact is not erroneous. The main purpose of the predicate is to get an atomic view of the fact in a multi-threaded application.

See also isErroneous.

otherwise
See.

or
See or.

orelse
See orelse.

predicate_fullname
predicate_fullname : -> string PredicateFullName.

This predicate returns the name <vp>PredicateFullName</vp> of the predicate in which it is invoked. The returned predicate name is qualified with a scope name.

<vp>predicate_fullname</vp> can only be used inside a clause. Use of <vp>predicate_fullname</vp> in other places causes a compile time error. See also predicate_name.

predicate_name
predicate_name : -> string PredicateName.

This predicate returns the name <vp>PredicateName</vp> of the predicate in which it is invoked.

<vp>predicate_name</vp> can only be used inside a clause. Use of <vp>predicate_name</vp> in other places causes a compile time error. See also predicate_fullname

programPoint
programPoint : -> core::programPoint ProgramPoint.

This predicate returns the name <vp>programPoint</vp> corresponding to the place where it is invoked.

retract
retract : (<fact-term> FactTerm) nondeterm anyflow.

Successively removes the first matching fact from the facts database. Fails when no more facts match.

Call-template for this predicate is:

retract(FactTemplate)

Here <vp>FactTemplate</vp> should be a fact term. The <vp>retract/1</vp> predicate deletes the first fact that matches the <vp>FactTemplate</vp> in the appropriated facts database. During backtracking, the rest of the matching facts will be deleted.

Notice that <vp>FactTemplate</vp> can have any level of instantiation. The <vp>FactTemplate</vp> is matched with the facts in the facts database, which means that any free variables will be bound in the call to <vp>retract/1</vp>.

The <vp>FactTemplate</vp> can contain any anonymous variables. That is, variables with names consisting from the single underscore <vp>_</vp> or a variable with a name starting with an underscore <vp>_AnyValue</vp> if the variable occurs only once in the clause. For example.

retract(person("Hans", _Age)),

will retract the first matched person fact that has "<vp>Hans</vp>" as the first argument and anything as the second argument.

When retracting a fact, which is declared to be determ, the call to <vp>retract/1</vp> will be deterministic.

See also retractall/1 and retractFactDb.

The <vp>retract/1</vp> predicate cannot be applied to single facts or fact variables.

Be careful calling <vp>retract/1</vp> with free <vp>FactTemplate</vp> 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 <vp>retract/1</vp> predicate fails when there are no more matches.

retractall
retractall : (<fact-term> FactTerm).

Remove all matching facts from the facts database.

Call-template for this predicate is:

retractall(FactTemplate)

Here <vp>FactTemplate</vp> should be a fact term.

The <vp>retractall/1</vp> retracts all facts which match the given FactTemplate. It always succeeds, even if no facts were retracted.

Attempting to retract a <vp>single</vp> fact will cause a compile time error.

It is not possible to obtain any output values from <vp>retractall/1</vp>. For this reason, the variables in the call must be bound or be a single underscores (anonymous). Notice that <vp>FactTemplate</vp> can have any level of instantiation, but free variables must be single underscores ("unconditionally anonymous"). In difference to retract/1 "conditionally" anonymous variables with names starting from the underscore (like <vp>_AnyValue</vp>) cannot be used in <vp>retractall/1</vp>.

See also retract/1 and retractFactDb/1.

retractFactDb
retractFactDb : (factDB FactDB).

Remove all facts from the named internal facts database <vp>FactDB</vp>.

Call-template for this predicate is:

retractFactDb(FactDB)

The <vp>retractFactDb/1</vp> removes all facts from the named facts database <vp>FactDB</vp>.

Notice, it is impossible to retract <vp>single</vp> facts and fact variables, so the predicate leaves such ones as they are.

See also retractall/1 and retract/1.

retractAll/2
Obsolete predicate! Use retractFactDb/1 instead.

sizeBitsOf
sizeBitsOf : ( DomainName) -> unsigned BitSize.

Retrieves the number of bits occupied in memory by an entity of the specified domain <vp>DomainName</vp>.

Call-template for this function is:

BitSize = sizeBitsOf(DomainName)

This compiling-time predicate receives the domain <vp>DomainName</vp> 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 <vp>sizeBitsOf/1-></vp> predicate returns the value that was defined for the size-field in a domain's declaration.

The following is always true for the integral domains:

sizeOfDomain(domain)*8 - 7 <= sizeBitsOf(domain) <= sizeOfDomain(domain)*8

See also sizeOfDomain/1->.

sizeOf
sizeOf : (Type Term) -> integer ByteSize.

Retrieves the number of bytes occupied in memory by the specified term <vp>Term</vp>.

Call-template for this function is:

ByteSize = sizeOf(Term)

The <vp>sizeOf/1-></vp> function receives a term as input parameter and returns value <vp>ByteSize</vp> that specifies the number of bytes occupied in memory by this term <vp>Term</vp>.

sizeOfDomain
sizeOfDomain : ( Domain) -> integer ByteSize.

Retrieves the number of bytes occupied in memory by the entity of the specified domain <vp>DomainName</vp>.

Call-template for this function is:

ByteSize = sizeOfDomain(DomainName)

This compiling-time predicate receives the domain <vp>DomainName</vp> 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 <vp>ByteSize</vp> belongs to the integer domain. Compare with sizeBitsOf/1->, which returns size of a domain measured in bits.

sourcefile_lineno
sourcefile_lineno : -> unsigned LineNumber.

Returns the current line number in the source file processed by the compiler.

sourcefile_name
sourcefile_name : -> string FileName.

Returns the name of the source file processed by the compiler.

sourcefile_timestamp
sourcefile_timestamp : -> string TimeStamp..

Returns a string that represents the date and time of the currently compiled source file in format YYYY-MM-DD HH:mm:ss. Where:


 * YYYY - Year.
 * MM - Month.
 * DD - Day.
 * HH - Hour.
 * mm - Minute.
 * ss - Second.

succeed
succeed :.

The predicate <vp>succeed/0</vp> will always succeed.

toAny
toAny : (Term) -> any UniversalTypeValue.

Converts the specified <vp>Term</vp> to the value of universal term type <vp>any</vp>.

Call-template for this function is:

UniversalTypeValue = toAny(Term)

A term of the <vp>any</vp> domain can be converted back to its original type using the <vp>toTerm</vp> predicates (see ).

toBinary
toBinary : (Term) -> binary Serialized.

Converts the specified <vp>Term</vp> to binary representation.

Call-template for this function is:

Serialized = toBinary(Term)

When a <vp>Term</vp> (of some domain domainName) 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 <vp>Serialized</vp> can be converted back to a Visual Prolog term, using toTerm/1-> function (the domain for the reversed term should be adequate to domainName) for the reverse conversion.

toBoolean
toBoolean : (<deterministic_expression> SubGoal) -> boolean Succeed.

The purpose of this meta-predicate is to convert an expression to the value of boolean domain.

Call-template for this meta-predicate is:

True_or_False = toBoolean(deterministic_expression)

this is equivalent to

True_or_False = if deterministic_expression then true else false end if

The <vp>toBoolean/1-></vp> meta-predicate returns boolean value. The result is <vp>true</vp> if deterministic_call succeeds. The result is <vp>false</vp> if deterministic_call fails.

toEllipsis
toEllipsis : (any* AnyTermList) -> ....

This predicate creates EllipsisBlock ... (i.e. the special varying parameters block) from the list of terms of the universal type <vp>any</vp>. Such EllipsisBlock can be later passed to a predicate which expects the varying number of arguments (i.e. is declared with the ellipsis (...)), like <vp>write/...</vp>, at the position of the ellipsis (...).

Call-template for this function is:

EllipsisBlock = toEllipsis(<any_term_list>), write(EllipsisBlock)

See also fromEllipsis/1->.

toString
toString : (Term) -> string Serialized.

Converts the specified <vp>Term</vp> to string representation.

Call-template for this function is:

Serialized = toString(Term)

When a <vp>Term</vp> (of some domain domainName) 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/1-> function (the domain of the return value should be adequate to domainName) for the reverse conversion.

toTerm
toTerm : (string Serialized) -> Term. toTerm : (binary Serialized) -> Term. toTerm : (any Serialized) -> Term. toTerm : ( Type, string Serialized) -> Term. toTerm : ( Type, binary Serialized) -> Term. toTerm : ( Type, any Serialized) -> Term.

Converts the string/binary/any representation of the specified term <vp>Serialized</vp> into representation corresponding to the domain of <vp>Term</vp> variable of the return value. The domain can be stated explicitly or it can be left to the compiler to determine a suitable domain.

Call-template for this function is:

Term = toTerm(Serialized) % with implicit domain Term = toTerm(domainName, Serialized) % with explicit domain, domainName

If the domain is not specified the compiler must be able to determine the domain for the returned value <vp>Term</vp> at compile-time. Notice that binary version of <vp>toTerm</vp> predicate performs almost byte to byte conversion and only checking general compatibility of <vp>Serialized</vp> data with the domain required to the return value <vp>Term</vp>. The programmer is wholly responsible for providing binary data of <vp>Serialized</vp> that can be correctly converted to the term of the desired domain. The <vp>toTerm</vp> predicates are counterparts to predicates toBinary/1-> and toString/1->. When a Term (of some domain domainName) is converted into a binary or string representation <vp>Serialized</vp> (by toBinary/1-> or toString/1-> or toAny/1-> correspondingly), it can safely be stored in a file or sent over a network to another program. Later the corresponding <vp>toTerm/1</vp>-> function can convert the obtained string/binary value <vp>Serialized</vp> back to a Visual Prolog term <vp>Term</vp>. For correctness of the reverse conversion the domain of the clause variable <vp>Term</vp> should be adequate to the initial domain domainName.

See also tryToTerm.

It gives a compile time error if the compiler cannot determine the return domain.

Exceptions


 * Run time errors are generated when the <vp>toTerm</vp> predicate cannot convert the string or binary into a term of the specified domain.

tryToTerm
tryToTerm : (string Serialized) -> Term. tryToTerm : (binary Serialized) -> Term. tryToTerm : (any Serialized) -> Term. tryToTerm : ( Type, string Serialized) -> Term. tryToTerm : ( Type, binary Serialized) -> Term. tryToTerm : ( Type, any Serialized) -> Term.

Converts the string/binary/any representation <vp>Serialized</vp> into a term <vp>Term</vp> like toTerm. The only difference between the predicates is that <vp>tryToTerm</vp> fails if it cannot convert the string or binary or any into a term of the specified domain whereas toTerm raises an exception.

See also toTerm.

tryConvert
tryConvert : ( Type, Value) -> Converted determ.

Checks whether the input term <vp>Value</vp> can be strictly converted into the specified domain <vp>Type</vp> and returns the converted term <vp>Converted</vp>.

Call-template for this function is:

ReturnTerm = tryConvert(returnDomain, InputTerm)

Arguments:


 * <vp>returnDomain</vp>: Specifies a domain to which <vp>tryConvert/2-></vp> predicate tries to convert the specified <vp>InputTerm</vp>. Here returnDomain can be any domain accessible in the current scope. The domain name returnDomain must be specified at compile-time, i.e. it cannot come from a variable.
 * <InputTerm> : Specifies the term that must be converted. <vp>InputTerm</vp> may be any Prolog term or an expression. If <vp>InputTerm</vp> is an expression, then it will be evaluated before conversion.
 * <ReturnTerm> : Returned term <vp>ReturnTerm</vp> will be of returnDomain domain.

The conversion rules are the same as of the embedded predicate convert/2->, but <vp>tryConvert/2-></vp> fails when convert/2-> generates conversion errors.

This predicate succeeds if the corresponding conversion succeeds. Otherwise it fails. The <vp>tryConvert/2-></vp> predicate tries to perform a clean and genuine conversion of the given <vp>InputTerm</vp> into a value of the specified domain returnDomain. The <vp>tryConvert/2-></vp> predicate will fail if the required conversion cannot be performed. When <vp>tryConvert/2-></vp> predicate succeeds, it returns the term <vp>ReturnTerm</vp> converted to the specified domain returnDomain.

For allowed conversions and rules of checked explicit conversions see convert/2-> predicate.

See also uncheckedConvert/2->.

typeDescriptorOf
typeDescriptorOf : ( Type) -> typeDescriptorOf TypeDescriptor. typeDescriptorOf : (Type Value) -> typeDescriptorOf TypeDescriptor.

Reflection predicate that returns the <vp>typeDescriptorOf</vp> of a type or a value.

A <vp>typeDescriptor</vp> is the reflection descriptor of an uninstantiated type/domain.

typeLibraryOf
typeLibraryOf : ( Type) -> typeLibrary TypeLibrary. typeLibraryOf : (Type Value) -> typeLibrary TypeLibrary.

Reflection predicate that returns the <vp>typeLibrary</vp> of a type or a value.

A <vp>typeLibrary</vp> is the reflection descriptor of an instantiated type/domain.

uncheckedConvert
uncheckedConvert : ( Type, Value) -> Converted.

Unchecked conversion of a value to another type.

Call-template for this function is:

ReturnTerm = uncheckedConvert(returnDomain, InputTerm)

Arguments:


 * <vp>returnDomain</vp>: Specifies a domain to which <vp>uncheckedConvert</vp> predicate unsafely converts the specified <vp>InputTerm</vp>. Here returnDomain can be any domain accessible in the current scope, the <vp>ReturnTerm</vp> should has the same bit-size as the <vp>InputTerm</vp>. The domain name returnDomain must be specified at compile-time, i.e. it cannot come from a variable.
 * <InputTerm> : Specifies the value that must be converted. <vp>InputTerm</vp> may be any Prolog term or an expression. If InputTerm is an expression, then it will be evaluated before conversion.
 * <ReturnTerm> : Returned parameter <vp>ReturnTerm</vp> will be of returnDomain type.

<vp>uncheckedConvert</vp> evaluates <vp>InputTerm</vp>, change the type to returnDomain without any modification of the memory pattern and unifies with <vp>ReturnTerm</vp>. The <vp>uncheckedConvert</vp> 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 <vp>uncheckedConvert</vp>. Be extremely careful implementing <vp>uncheckedConvert</vp>; we strongly recommend you always, when it is possible, using of convert/2-> and tryConvert/2->. But notice that, when an object is returned by COM system it is necessary to convert it by <vp>uncheckedConvert</vp>, as Prolog program does not have information about its actual type.

upperBound
upperBound : (<numeric-domain> NumericDomain) -> <number-domain> UpperBound.

Returns the upper bound value of the specified numeric domain.

Call-template for this function is:

UpperBound = upperBound(domainName)

The <vp>upperBound</vp> is a compiling-time predicate. The <vp>upperBound</vp> returns the upper bound value of the specified numeric domain domainName. The return value <vp>UpperBound</vp> belongs to the same domain domainName. The domainName parameter should be the name of any numerical domain; this domain name should be explicitly specified at compile-time (that is, domainName cannot come from a variable).

See also lowerBound/1->.

Will cause a compile time error if the specified domain domainName is not numeric domain.