]> Repositorios git - scryer-prolog.git/commitdiff
ENHANCED: the toplevel interaction now supports RETURN as a synonym for "."
authorMarkus Triska <[email protected]>
Sat, 18 Apr 2020 15:47:24 +0000 (17:47 +0200)
committerMark Thom <[email protected]>
Sat, 18 Apr 2020 20:16:46 +0000 (14:16 -0600)
This is made possible due to the recent improvements by @notoria.

README.md
src/prolog/toplevel.pl

index 4fa1bab57730886618f31183c11aa9e4a9c078b4..652e7b9869f674bcd4eb89b448ea1cd6236ccedf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -168,8 +168,8 @@ predicates it defines. For example, with the program shown above:
 ;  What = pure_world.
 ```
 
-Press `SPACE` to show further answers, if any exist. Press&nbsp;`.` to
-abort the search and return to the toplevel&nbsp;prompt.
+Press `SPACE` to show further answers, if any exist. Press `RETURN` or
+&nbsp;`.` to abort the search and return to the toplevel&nbsp;prompt.
 Press&nbsp;`h` to show a help message.
 
 To quit Scryer Prolog, use the standard predicate `halt/0`:
index d15e0f6d3fd049d7327f1568795bac73aa3ffe43..9538c5ace2b708f5e771d0486e912b753e8604d7 100644 (file)
     ;  C = h ->
        '$help_message',
        '$read_input'(ThreadedGoals, NewVarList)
-    ;  C = '.' ->
+    ;  member(C, ['\n', .]) ->
        nl, write(';  ...'), nl
     ; '$read_input'(ThreadedGoals, NewVarList)
     ).
 '$help_message' :-
     nl, nl,
     write('SPACE, "n" or ";": next solution, if any\n'),
-    write('".": stop enumeration\n'),
+    write('RETURN or ".": stop enumeration\n'),
     write('"h": display this help message\n'),
     write('"w": write terms without depth limit\n'),
     write('"p": print terms with depth limit\n\n').