Visual Prolog 8 throws error c504: expression has type '() → :: char procedure', which is incompatible with type ':: char'.
main.pro
implement main
open core, console
class predicates
: ().
print : ().
clauses
().
print() :-
console::initUtf8(),
,
C = readChar,
/* C */
write(C),
C1 = convert(char, C),
C2 = convert(char, '\r').
C1 = C2.
/* ? fail, */
run() :-
,
fail.
run() :-
succeed.
% place your own code here
end implement main
goal
mainExe::run(main::run).
How to fix it?
source
share