🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1079

Having trouble with disjunction

#1079
From: F0O
Date: Tue, 14 Aug 1990 13:17
13 lines
775 bytes
    Last night, in PDC prolog I was trying to write the following predicate:

         gofirst(Player) :-
             random(RandNum),
             RandNum < 0.5, Player = computer ;
             RandNum >= 0.5, Player = opponent.

    When I tried to run the program, I got the message 'Free variables
not allowed here', at Player = opponent.
    Is this a quirk of PDC prolog, or don't I fully understand disjunction?

                                                         [Tim]
Technical Details
Message-ID: <90226.091749F0O@psuvm.psu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!psuvax1!psuvm!f0o

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!psuvax1!psuvm!f0o
From: F0O@psuvm.psu.edu
Newsgroups: comp.lang.prolog
Subject: Having trouble with disjunction
Message-ID: <90226.091749F0O@psuvm.psu.edu>
Date: 14 Aug 90 13:17:49 GMT
Organization: Penn State University
Lines: 13