mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] character '>' in the "extern" primitive


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] character '>' in the "extern" primitive
  • Date: Wed, 17 Sep 2008 20:08:05 +0200

Takama M. wrote:

>Hi,
>
>i wrote the following macro:
>
><assign|pi()|<macro|<extern|(lambda () (number->string (acos -1)))>>> ,
>
>but it does not work with an error message s.t.
>Unbound variable: ~S|<number->string> .
>
>However, by renaming the procedure name
>"number->string" to "number-string", for example (with a Scheme session)
>
>scheme] (tm-define number-string number->string)
>
>the modified macro
><assign|pi()|<macro|<extern|(lambda () (number-string (acos -1)))>>> .
>works.
>
>why?
>
>Is there some trick that handle the character '>' in scheme codes
>in the "extern" primitive?
>
>Or another reason that causes the macro not to work?.
>
>
>
>
1) You should not write "pi()", but "pi",
the "()" is ignored, and in future versions,
it is likely to break ;

2) There is no trick to handle the "<", except
incredibly unreadeable ones, like turning
the ASCII code of "<" to a character, then
building the name of the function you want
as a string, then calling "eval" (at least
to my knowledge, this is the current situation) ;



Archive powered by MHonArc 2.6.19.

Top of page