[q-lang-users] modules and visibility
Brought to you by:
agraef
From: Arnoldo J. M. M. <ar...@da...> - 2006-01-08 04:03:37
|
Dear All, Thank you so much for all your previous help. Thanks to your advice I've been able to understand Q better. Every day I like Q more and more! (* x *)V I have two files: t1.q: //////////////////////////// public fspec; fspec(fcondition) = true; fspec(parameterRef) = true; fspec(methodRef) = true; fspec(fieldRef) = true; fspec(ftype) = true; fspec(localRef) = true; fspec(_) = false; //////////////////////////// and t2.q: //////////////////////////// import "t1"; //////////////////////////// When I execute the interpreter with "q t1.q" and enter the following: ==> fspec(localRef) true I will of course get true, When I execute the interpreter with "q t2.q" and enter: ==> fspec(localRef); false I unexpectedly get false... Using "debug on" I get the following: ==> fspec(localRef); 0> t1.q, line 10: fspec localRef ==> false (type ? for help) : ** fspec localRef ==> false false (Line 10 is the last rule of the t1.q file) What am I doing wrong? If I comment out line 10, Q will not execute the rule fspec, it's like the fspec rule disappears. (T _ T) Thanks in advance! |