From dima@solvo.ru Fri Mar  2 11:21:25 2001
Received: from dual.solvo.ru (dual.solvo.ru [195.201.44.111])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f22ALPZ25901
	for <prolog@swi.psy.uva.nl>; Fri, 2 Mar 2001 11:21:25 +0100 (MET)
Received: from dual by dual.solvo.ru with esmtp
	(Smail3.2.0.111 #2) id m14Ymge-001VEhC; Fri, 2 Mar 2001 13:21:24 +0300 (MSK)
Date: Fri, 2 Mar 2001 13:21:20 +0300 (MSK)
From: =?koi8-r?B?5M3J1NLJyiDzLiDr1drYzcnO?= <dima@solvo.ru>
To: prolog@swi.psy.uva.nl
Message-ID: <Pine.LNX.4.10.10103021313520.21419-100000@dual.solvo.ru>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [SWIPL] random/1



Hi !
--------------------------------------------------------
	I read on-line documentation
	from
http://www.swi.psy.uva.nl/projects/SWI-Prolog/Manual/sec-3.27.html#random/

	anr read this:

random(+Int) 	Evaluates to a random integer i for which 0 =< i < Int. The
		seed of this random generator is determined by the system clock when
		SWI-Prolog was started.

	But :

?- time((X=10,repeat,Y is random(X),(Y==9 -> true; fail))). % 6 inferences
in 0.00 seconds (Infinite Lips)
 
X = 10 Y = 9
 
Yes
?- time((X=10,repeat,Y is random(X),(Y==10 -> true; fail))).                                 

and may wait how want for result.

May be random(+Int) generate i from 0=< i =< Int-1 ? 

Thanks for answer.

--------------------------------------------------------
 With regard to all, Dima                                     

