relates a term and one of its arguments....
Move to
=> <=
Darueber Spitze
See also
arg/3
copy_term/2
functor/3
=../2
IF Computer > MINERVA > Manual > Reference > Predicates > Term creation and decomposition > arg/3

arg/3

relates a term and one of its arguments.

arg(+N, +CompoundTerm, -Argument)

arg/3 unifies Argument with the N-th argument of CompoundTerm.

Arguments

N                      integer (between 1 and the arity of CompoundTerm)
CompoundTerm           compound term
Argument               term

Examples

arg(1, f(a,b,c), X). Succeeds with substitution X <- a.
arg(2, f(X, g((a,h(a,b))), g(a,Z)). Succeeds with substitution Z <- h(a,b)
arg(3,f(a,b),X). Fails.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

copy_term/2, functor/3, '=..'/2.

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Sprache
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/term_creat_decomp/arg/home_de.html
published 2008/10/6 update 1998/8/11 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS