To sleep or not to sleep.

Share Tips, Code Samples, etc. with the Visual Prolog community.
Post Reply
User avatar
José A. Becerril
Active Member
Posts: 60
Joined: 22 Apr 2000 23:01

To sleep or not to sleep.

Unread post by José A. Becerril » 22 Sep 2010 22:22

Code: Select all

    ... uncertainProcess() ...     facts       sleeping:integer:=0.       predicates       increaseSleep:().       clauses       increaseSleep():-       sleeping<500,       sleeping:=sleeping+10,         uncertainProcess(),!.             increaseSleep():-       stdio::write("uncertainProcess failed"),!.                    predicates      uncertainProcess:().      clauses      uncertainProcess():-      programControl::sleep(sleeping),      file::existfile("myfile.txt"),      stdio::write("I have seen the file"),!.            uncertainProcess():-       increaseSleep(),!.

Post Reply