IF Computer > MINERVA > Manual > Reference > Predicates > Logic and control > ';'(Disjunction)/2

';'(Disjunction)/2

MINERVA
ifcomputer logo
f
Expert Services on the Web

executes one of two goals.

+Goal1;+Goal2
;(+Goal1,+Goal2)

';'/2 succeeds if Goal1 or Goal2 succeeds. If Goal1 succeeds Goal2 will not be executed. Goal2 will be executed only if Goal1 fails.
By backtracing Goal1 as well as Goal2 can have more than one solution. First Goal1 is backtraced. After finding all solutions of Goal1 Goal2 will be backtraced.
';'/2 is a predefined infix-operator with priority 1100 which is right-associative (see also current_op/3).

Arguments

Goal1                  goal
Goal2                  goal

Examples

;(integer(2.2), integer(3)). Succeeds.
write(goal1),write(' and goal2'). Succeeds and writes 'goal1'.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

abort/0, break/0, call/1, fcall/1, catch/3, ','(conjunction)/2, '!'(cut)/0, fail/0, true/0, halt/0/1, '->'(if-then)/2, ';'(if-then-else)/2, '\+'(not provable)/1, once/1, repeat/0, throw/1.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/logic_and_control/disjunction/print_de.html
published 2008/7/21 update 2001/2/7 (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
Back> managed with ubiCMS