m4-discuss
[Top][All Lists]
Advanced

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

Help on M4 Usage


From: Nidhin Joseph
Subject: Help on M4 Usage
Date: Fri, 29 Apr 2016 20:26:22 +0530

Hi,
 I'm stuck with a doubt regarding M4 usage. I want M4 to identify quoted strings and replace the quotes along with the key.

 For example,
   I have a definition inside .m4 file as
       define_m4(MY_CUSTOM_KEY, 50 );
  
   And now in my source file, I have two funtion calls
     getApproximateValue(MY_CUSTOM_KEY);
     getApproximateValue("MY_CUSTOM_KEY");
     
   After running M4, what I'm expecting is
     getApproximateValue(50);
     getApproximateValue(50); //replace the quotes also
    
  
   But what I'm getting is simple macro expansion as shown below.
     getApproximateValue(50);
     getApproximateValue("50")

I understand, M4 is working as expected. Could you please help me to know whether my requirement is achievable without modifying the .M4 definition file?

Thanks,
Nidhin

reply via email to

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