moxie - jlombar1 - prolog > pl Welcome to SWI-Prolog (Version 2.7.16) Copyright (c) 1993-1996 University of Amsterdam. All rights reserved. For help, use ?- help(Topic). or ?- apropos(Word). 1 ?- consult('colorsV1.pro'). colorsV1.pro compiled, 0.00 sec, 1,844 bytes. Yes 2 ?- listing | ^C Action (h for help) ? Options: a: abort b: break c: continue e: exit g: goals t: trace h (?): help Action (h for help) ? Unknown option (h for help) Action (h for help) ? Unknown option (h for help) Action (h for help) ? Unknown option (h for help) Action (h for help) ? exit moxie - jlombar1 - prolog > pl Welcome to SWI-Prolog (Version 2.7.16) Copyright (c) 1993-1996 University of Amsterdam. All rights reserved. For help, use ?- help(Topic). or ?- apropos(Word). 1 ?- consult('colorsV1.pro'). colorsV1.pro compiled, 0.00 sec, 1,844 bytes. Yes 2 ?- listing. mix(blue, red, purple). mix(red, yellow, orange). mix(blue, yellow, green). other(aqua). other(mauve). secondary(orange). secondary(purple). secondary(green). primary(red). primary(blue). primary(yellow). '$user_query'(2, []) :- listing. Yes 3 ?- primary(purple). No 4 ?- primary(blue). Yes 5 ?- primary(X). ; X = red ; X = blue Yes 6 ?- primary(yellow). Yes 7 ?- primary(X) ; | | | exot | exit | ^C Action (h for help) ? Options: a: abort b: break c: continue e: exit g: goals t: trace h (?): help Action (h for help) ? abort Execution Aborted 7 ?- primary(X). X = red ; X = blue ; X = yellow ; No 8 ?- primary(P),write(P),nl,fail. red blue yellow No 9 ?- secondary(P),write(P),nl,fail. orange purple green No 10 ?- other(mauve). Yes 11 ?- other(blue). No 12 ?- other(magenta). No 13 ?- other(Other),write(Other),nl,fail. aqua mauve No 14 ?- mix(blue,red,Color). Color = purple ; No 15 ?- mix(red,blue,Color). No 16 ?- mix(C1,C2,green). C1 = blue C2 = yellow Yes 17 ?- halt | ^C Action (h for help) ? Options: a: abort b: break c: continue e: exit g: goals t: trace h (?): help Action (h for help) ? abort Execution Aborted 17 ?- halt.