[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Klippe - klistre macro



"Egon Andersen, Talura" <sslug@sslug> writes:

> Jeg ønsker altså en macro i stil med:
> 
> #define MYMACRO(a) a /* 'a' skal blot have fjernet første bogstav */
> 
> MYMACRO(@Test) skal altså resultere i: Test
> 
> Test er nu en gyldig variabel-navn, defineret i fx. en header-fil og i
> princippet uinteressant for applikationsdesigneren, der kun skal kende
> navnet @Test.

Det kan cpp ikke klare.

Maaske kunne du bruge m4?

Eller måske lidt simpel Perl kode vil gøre det. Vil du have mere
specikke råd må du lige beskrive helt konkret hvad du vil -- hvor
kommer de identifiers fra, hvad vil du gøre med det modificerede navn.


-- 
===============================================================
<sslug@sslug>     Herlev, Denmark     Software Designer
<URL:http://www.andreasen.org/>   <*>   Eicon Networks Research
===============================================================



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *