/tmp/testit.m4:
define(`First', index($1,`@'))
First(`foo@bar@baz')
index(`foo@bar@baz',`@')


dca@franz:/tmp$ m4 testit.m4

-1
3
dca@franz:/tmp$

I'm stumped as to why the index call in First returns -1, whereas the
direct call returns the correct index. In trying to understand this,
I've defined a 'myindex' macro that simply returns its arguments, and
they are the same in both cases.

Any help would be appreciated.

/Don Allen

Reply via email to