generates an ordered sequence of numbers....
Move to
=> <=
Darueber Spitze
See also
for/3
is/2
IF Computer > MINERVA > Manual > Reference > Predicates > Arithmetic evaluation > for/3

for/3

generates an ordered sequence of numbers.

for(+Start, ?Counter, +End)

for/3 generates an ascending ordered sequence of integers with starting value Start and ending value End, where the step between two numbers is 1. If End is less than Start then the predicate fails.

Arguments

Start                  integer
Counter                integer
End                    integer

Examples

% occurs_in(+Arg, +Term)
% check if Term occurs in Term
occurs_in(Arg, Term) :-
	Arg == Term, !.
occurs_in(Arg, Term) :-
	compound(Term), !,
	functor(Term, _, Arity),
	for(1, I, Arity),
	arg(I, Term, SubTerm),
	occurs_in(Arg, SubTerm), !.

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

is/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/arithm_eval/for/home_de.html
published 2008/7/7 update 1997/6/22 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS