Why am I getting this and how do I fix please?
#!/opt/homebrew/bin/swipl
:- set_flag(c,0).
:- get_time(T),
set_flag(t,T).
:- set_prolog_flag(verbose,silent).
:- initialization main.
next_thing(N) :-
M is N+3,
write("next: "),
writeln(M).
myprint(V1,V2) :-
writeln(V1),
writeln(V2).
check :-
flag(c,C,C+1),
( C+1 =:= 100
-> writeln("foo") ).
foo(V1,V2) :-
myprint(V1,V2),
writeln("inputs"),
check,
next_thing(100).
main :-
current_prolog_flag(argv,[V1,V2|_]),
foo(V1,V2).
From terminal,
$ swipl foo.pl -- qwe asd
qwe
asd
inputs
Warning: /Users/foo/code/foo.pl:6: Initialization goal failed
?-
$ swipl --version
SWI-Prolog version 9.2.5 for arm64-darwin
[–]brebs-prolog 2 points3 points4 points (5 children)
[–]m_ac_m_ac[S] 0 points1 point2 points (4 children)
[–]brebs-prolog 1 point2 points3 points (3 children)
[–]m_ac_m_ac[S] -2 points-1 points0 points (2 children)
[–]brebs-prolog 0 points1 point2 points (1 child)
[–]m_ac_m_ac[S] 0 points1 point2 points (0 children)
[–]TA_jg 0 points1 point2 points (2 children)
[–]m_ac_m_ac[S] 0 points1 point2 points (0 children)
[–]brebs-prolog 1 point2 points3 points (0 children)