public class length extends DefaultInternalAction
Internal action: .length
.
Description: gets the length of strings or lists.
Parameters:
Examples:
.length("abc",X)
: X
unifies with 3.
.length([a,b],X)
: X
unifies with 2.
.length("a",2)
: false.
concat
,
delete
,
max
,
member
,
min
,
sort
,
nth
,
sort
,
reverse
,
difference
,
intersection
,
union
,
function version
,
Serialized FormConstructor and Description |
---|
length() |
Modifier and Type | Method and Description |
---|---|
static InternalAction |
create() |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
public static InternalAction create()
public int getMinArgs()
getMinArgs
in class DefaultInternalAction
public int getMaxArgs()
getMaxArgs
in class DefaultInternalAction
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class DefaultInternalAction
java.lang.Exception