| Did you know ... | Search Documentation: |
| Get methods |
answer
stack. They are deleted from this stack iff
->lock_objected
(or given a named reference)Both event-call-back and the execution of a PCE method mark and rewind this stack. Thus
?- new(X, point).
Creates a point and leaves it on the answer-stack, while
?- [user]. create_point :- new(X, point). ^D ?- send(@prolog, create_point).
Creates a point, pushes it on the answer-stack. Then rewinds this
stack on exit of the host->create_point,
garbage collection the point
object. Thus
?- pceusage(send(@prolog, create_point)).
<-convert
provides access to type<-check,
the PCE type checking and conversion system. The first argument is the
object to be checked/converted. The second is the type that should be
met.
Equivalent to type<-check,
but generally more comfortable as this method will automatically
translate a type specification into a type
object.
The following example converts anything convertible to an integer to an integer:
convert_to_int(Any, Int) :-
get(@pce, convert, Any, int, Int).
After which
convert_to_int('78', X) ==> 78
convert_to_int(string('1992'), X) ==> 1992
convert_to_int(hello, X) fails
convert_to_int(100, X) ==> 100
<-check <-convert
-language
is not included<-core_wasted
@see tool Statistics->list_wasted_core <-core_usage Note that the host language is normally part of the same process.
->benchctime(3)
and returns the result as a string
object. The returned string has no trailing newline (as its Unix
counterpart). Its format is:
Sun Sep 16 01:03:52 1973
See also class date.
<-string ->free’d
by the user, but are still referenced. To avoid crashes, the memory
belonging to such objects is not freed as long as there are references
to the object.
If name is PCEHOME and this is not defined as a
Unix environment variable, the value of pce<-home
is returned.
Diagnostics: If the variable is not defined pce<-environment_variable
fails silently.
-home|functionnew()). @pce pce<-instance
converts the first argument into a class. This process deals with
handling class-names rather then class
objects and invokes the autoloader if the class does not yet exist (see pce_autoload/2
and
pce<-exception_handlers).
Next, the method class<-instance
is called to create the new instance.
The following function creates a new point object each time it is evaluated:
?(@pce, instance, point, 4, 5)
See also class create, class<-instance
and @vmi_new.
<-instanceint or number. Current range:
-2^29 ... 2^29 - 1 (-536870912 ... 536870911)
<-min_integer<-max_integer
<-max_integer|name -> object=unchecked?- get(@pce, object_from_reference, prolog, Obj) Obj = @prolog
This is the inverse of object<-object_reference.
See also object<-convert.
These methods are used seldomly by application programmers.
<-object_reference ->for_name_referenceget(class(object), no_created, @on, Count)
See class<-no_created
and class<-no_freed.
<-objects_freed -no_created -no_freed
@see pce<-objects_allocated
@see tool Statisticsperror(2).
Its use is not encouraged.
-last_error?- new(TmpFile, file).
See file->initialise.
<-kind,
but have no initialised class associated with them. A name that is not
the name of an existing class will be converted into a type of kind class.
This type is only useful after the class is actually created. This
mechanism allows the programmer to refer to classes as a type before
defining them.
The most likely cause of this trouble is a misspelled type-name or a forgotten class definition.
getlogin()
or password information from the current UID. On Windows it examines the
environment variable %USER%.
See also pce<-user_info.