Re: File and line number in the source file

Guilhem de Wailly <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <[email protected]>
Thank you again very much and have a nice we.
Guilhem

Le 18/07/2014 16:05, Cyprien Nicolas a écrit :
> Il y a 1 heure et 39 minutes, Guilhem de Wailly écrivit :
>> Cyprien,
>>
>> I put the code in my main.scm
>>
>> (define bla '(some value))
>> (pp (cer bla))
>> (pp (typeof bla))
>>
>>
>> I can compile it, but at run time I got:
>>
>> File "main.scm", line 28, character 571:
>> #(pp (cer bla))
>> #         ^
>> *** ERROR:toplevel-init
>> Type "epair" expected, "pair" provided -- (some value)
>>       1. %toplevel@myAltisServer, main.scm:5
>>
>> Could you please help me one more time?
> Sure.  Actually it's better to not use cer with quoted list, but
> prefer using it at macro-expansion time.
>
> I attach a sample file that create two macros `foo' and `bar', each
> taking some scheme expression which are displayed and evaluated (and
> the result of the evaluation is displayed too).  I use the CER feature
> to get the location of the macro's arguments.
>
> The foo macro is defined using define-macro, while `bar' use bigloo's
> expander system.
>
> Hope this helps,
>
> Regars,
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.