Note that this predicate returns a string, while the corresponding predicate iso:get_char/2 returns an atom!
Success:
?- get_char(input,Char).
a
Char = "a"
yes.
?- get_char(input, "b").
b
yes.
?- sh('cat file1').
p
yes.
?- open(file1, update,s),
get_char(s,X).
X = "p"
yes.
Fail:
?- get_char(input, "b").
a
no.
Error:
get_char(Stream, "b"). (Error 4).
get_char(input, 'b'). (Error 5).
get_char(input, 98.0). (Error 5).
get_char("string", Char). (Error 5).
get_char(null,Char). (Error 190).
get_char(9,Char). (Error 192).
get_char(atom,Char). (Error 193).