Availability::- use_module(library(jpl)).
(can be autoloaded)
[det]jpl_set(+X,
+Fspec, +V)sets the Fspec-th field of (class or object) X to
value V iff it is assignable
X can be
- a class instance (for static or non-static fields)
- or an array (for indexed element or subrange assignment)
- or a classname, or a
class(_,_)
or array(_)
type (for static fields)
- but not a String (no fields to retrieve)
Fspec can be
- an atomic field name (overloading through shadowing has yet to be
handled properly)
- or an array index I (X must be an array object: V
is assigned to X[I])
- or a pair I-J of integers (X must be an array object, V
must be a list of values: successive members of V are
assigned to X[I..J])
V must be a suitable value or object.