bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possibly a bug?


From: Donald Allen
Subject: Possibly a bug?
Date: Fri, 9 Oct 2015 08:57:04 -0400

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


address@hidden:/tmp$ m4 testit.m4

-1
3
address@hidden:/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

[Prev in Thread] Current Thread [Next in Thread]