"Nyeste Szabolcs" <infolist(a)citromail.hu> writes:
A következõ programra redukáltam a kérdéses részt:
:- op(100,fx,~).
p(Kif) :-
( Kif = ~_K -> write('Halo')
; write('No')
).
Megpróbáltam fcompile-al és compile-al is, az eredmény az fcomp.txt file-ban. Az ETS
ugyanezt a hibaüzenetet adta, amikor operátoros formában próbáltam beadni a házit.
Koszonjuk a hibajelentest. Mint a SICStus kezikonyv is irja, lasd alabb, az
fcompile-t illik megelozni egy tenyleges betoltessel (compile,
ensure_loaded, stb.). Ezt az ETS eddig nem tette. Javitjuk.
-Peter
6.4 Considerations for File-To-File Compilation
===============================================
When compiling a source file to a `.ql' file, remember that clauses are
loaded and directives are executed at _run time_, not at compile time.
Only predicate declarations are processed at compile time. For
instance, it does not work to include operator declarations or clauses
of `user:term_expansion/[2,4]' or `user:goal_expansion/3' or any
auxiliary predicates that they might need, and rely on the new
transformations to be effective for subsequent clauses of the same file
or subsequent files of the same compilation.
Any directives or clauses that affect the compile-time environment
must be loaded prior to compiling source files to `.ql' files. This
also holds for meta-predicates called by the source files but defined
elsewhere, for module name expansion to work correctly. If this
separation into files is unnatural or inconvenient, one can easily
ensure that the compile-time environment is up to date by doing:
| ?- ensure_loaded(FILES), fcompile(FILES).