Re: improve substr

Jack Woehr <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Jack Woehr on 12/24/2008 7:14 PM:
>   
>> Eric Blake wrote:
>>     
>>> Again, implementing this natively will be more efficient.  What do you
>>> think of adding these two enhancements to substr?
>>>   
>>>       
>> I think anything you want to do is okay as long as it is a perfect
>> superset of the existing behavior. m4 goes back to the mid-1970's
>> and we shouldn't break existing code. Especially not mine! :)
>>     
>
> It's doubtful that any portable m4 scripts were relying on traditional
> behavior,

Agreed. Certainly not any of mine!

> define(`substr',
>   `ifelse(eval($2 < 0 || $3-0 < 0), 1, `',
>           `builtin(`substr',$@)')')
>   

You're the wiz!

> Don't work too hard, make some time for fun as well!
>   

So why are we both on the computer network tonite? :)

-- 
Jack J. Woehr            # Fate lessons of the past and present
http://www.well.com/~jax # were now in session.
http://www.softwoehr.com #  - Steven Wright, _The Beach_

_______________________________________________
m4-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-discuss
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.