From 8ef27e2fe652a8b29a8b57589863f2f2b45f9425 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Fri, 16 Jul 2021 15:36:42 +0000 Subject: Pass arguments to repl/1 --- repl.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'repl.pl') diff --git a/repl.pl b/repl.pl index eb272a9..60521df 100644 --- a/repl.pl +++ b/repl.pl @@ -1,9 +1,17 @@ :- module(repl, []). -repl :- +repl(Args) :- + write('Welcome to p-prolog version 1'), + nl, + write('Started with args: '), + write(Args), + nl, + repl_loop. + +repl_loop :- catch(read_eval_print, E, print_exception(E)), '$collect_garbage', - repl. + repl_loop. read_eval_print :- write('?- '), -- cgit v1.2.3