m4-discuss
[Top][All Lists]
Advanced

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

Re: improve substr


From: Jack Woehr
Subject: Re: improve substr
Date: Wed, 24 Dec 2008 21:56:56 -0700
User-agent: Thunderbird 2.0.0.12 (X11/20080921)

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_

reply via email to

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