Thankx Hans, But why does this work with "def" and not with "vardef" . "list" is just a macro name i've used. And "A,B,C,A" is just the replacement text I want when I call the macro "list". Is there any other way of doing this? Vinuth. -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze
At 06:55 10/04/2004, you wrote:
Thankx Hans,
But why does this work with "def" and not with "vardef" . "list" is just a macro name i've used.
And "A,B,C,A" is just the replacement text I want when I call the macro "list".
from the name vardef you can deduce that it acts like a var; see Jonathan Nicholl's excellent explanation for more details, in general a vardef is used in situations where you want to do a lot of things and only get back teh result n := 0 ; def blabla (expr x) = (1+x) enddef ; a := blabla(1) ; % a := (1+1) def blabla (expr x) = n := n + 1 ; (1+x) enddef ; a := blabla(1) ; % fails, since now the expansion becomes visible: a := n := n+1 ; (1+x) vardef blabla (expr x) = n := n + 1 ; (1+x) enddef ; a := blabla(1) ; % a := (1+1) also, vardef has grouping built in
Is there any other way of doing this?
not that i know of Hans
participants (2)
-
Hans Hagen
-
vinuth madinur