]> Repositorios git - scryer-prolog.git/commitdiff
small simplifications
authorMarkus Triska <[email protected]>
Sat, 18 Apr 2020 15:40:19 +0000 (17:40 +0200)
committerMark Thom <[email protected]>
Sat, 18 Apr 2020 20:16:46 +0000 (14:16 -0600)
src/prolog/toplevel.pl

index 4ca9ab41452894f300f80d060c9b9e9721754542..d15e0f6d3fd049d7327f1568795bac73aa3ffe43 100644 (file)
 
 '$read_input'(ThreadedGoals, NewVarList) :-
     get_single_char(C),
-    (  C == w ->
+    (  C = w ->
        nl,
        write('   '),
        '$write_eq'(ThreadedGoals, NewVarList, 0),
        '$read_input'(ThreadedGoals, NewVarList)
-    ;  C == p ->
+    ;  C = p ->
        nl,
        write('   '),
        '$write_eq'(ThreadedGoals, NewVarList, 20),
        '$read_input'(ThreadedGoals, NewVarList)
-    ;  C == (';') ->
+    ;  member(C, [';', ' ']) ->
        nl, write(';  '), false
-    ;  C == (' ') ->
-       nl, write(';  '), false
-    ;  C == h ->
+    ;  C = h ->
        '$help_message',
        '$read_input'(ThreadedGoals, NewVarList)
-    ;  C == '.' ->
+    ;  C = '.' ->
        nl, write(';  ...'), nl
     ; '$read_input'(ThreadedGoals, NewVarList)
     ).