variable definition in include files not usable in class file

Damien Mattei damien.mattei@gmail.com
Tue Oct 3 15:34:00 GMT 2017


possible, but i can explain it works in Bigloo if this one does not respect
hygienic expansion, but Bigloo do it:
https://www-sop.inria.fr/indes/fp/Bigloo/doc/bigloo-25.html#Macro-expansion
if there were some hygienic caveit in my macro definitions , it would fail
with Bigloo Scheme too,
but it works as you can see in this ouput of logs, when running another
portion of the code that use exactly the same debug macros, debug-macro is
well defined (#t):

Sidonie : ResultatMesuresF : postHandler : identificateur :N° BD
BiglooCode.scm :: ResultatMesuresF ::  debug-mode = #t
BiglooCode.scm :: ResultatMesuresF ::  nombreobjets = 0
BiglooCode.scm :: ResultatMesuresF :: bstr_identificateur = N° BD
BiglooCode.scm :: ResultatMesuresF :: bstr_objet = 56.130
BiglooCode.scm :: ResultatMesuresF :: len_identificateur = 6
BiglooCode.scm :: ResultatMesuresF :: (string? bstr_identificateur) = #f
BiglooCode.scm :: ResultatMesuresF :: identificateur = N° BD
BiglooCode.scm :: ResultatMesuresF :: (string? identificateur) = #t
TEST N° BD
TEST N° BD
BiglooCode.scm :: ResultatMesuresF :: essai = TEST N° BD
BiglooCode.scm :: ResultatMesuresF :: identificateur = N° BD
BiglooCode.scm :: ResultatMesuresF :: (string? essai) = #t
BiglooCode.scm :: ResultatMesuresF :: (string=?  identificateur "" ) = #f

Sidonie : DataBase : searchDriver : driver found
Sidonie : DataBase : connectStatic : Hostname = moita.oca.eu
Sidonie : DataBase : connectStatic : using localhost as computer name and
mattei as user for sidonie database
Sidonie : DataBase : connectStatic : connection established
Sidonie : DataBase : createStatementStatic : done

debug.scm : debug-display-nl : debug-mode = #t
BiglooCode.scm :: ResultatMesuresF :: choixres =
Ref
debug.scm : debug-display-nl : debug-mode = #t
BiglooCode.scm :: ResultatMesuresF :: (cond : Ref
debug.scm : debug-display-nl : debug-mode = #t

Damien


On Tue, Oct 3, 2017 at 5:21 PM, Sudarshan S Chawathe <chaw@eip10.org> wrote:

> I did not get a chance to look at your code carefully but, based on a
> very quick look, I suspect that it may be running afoul of
> syntactic-hygiene rules.  In particular, I believe that the identifier
> debug-mode used in the syntax-definitions of 'debug', etc., cannot refer
> to the top-level debug-mode variable due to hygiene rules.
>
> Regards,
>
> -chaw
>
>



More information about the Kawa mailing list