[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



Mads Bondo Dydensborg wrote:
> 
> On Fri, 15 Jun 2001, Egon Andersen, Talura wrote:
> 
> > Hej
> >
> > Jeg sidder og roder med nogle C-macro'er, hvor jeg sætter nogle
> > elementer sammen vha. ##
> > Nu er jeg kommet i den situation, at jeg også gerne vil kunne fjerne fx.
> > det første og/eller sidste tegn i et element.
> >
> > Eksempel:
> > @T skal konverteres til T
> > T.0 skal konverteres til T.n
> >
> > Ka' man det?
> 
> Jeg synes ikke det er klart hvad du vil. Kan du ikke skrive hvad du vil
> opnå i en linie kildekode, f.eks.?
> 
> Mads
> 
Nu må vi se om mine pædagogiske evner rækker :-)

Problemet er at jeg har nogle identifier-navne, der ikke er gyldige i
'C', men jeg vil gerne bibeholde navnene og så lade de 'ugyldige'
navnene blive ændret til gyldige navne vha. en macro.

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.

Hjalp det lidt på forståelsen af problemet eller er det stadig 'far
out'?

/Egon


 
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] *